Sunday, May 21, 2017

Upload files when using homestead

I'm moving my project to homestead and I got strange behavior when it comes to uploading files. Previously when working no on homestead it worked fine.

Code which is responsible for uploading files:

$path = $request->file('result')->store('results');
$fileContent = Storage::get($path);

So it should just store a file under results folder.

What actually happens:

  1. For some reason the permissions on the results folder become 755 even though I set them to 777 before

  2. I got an error when uploading file: fopen(/home/vagrant/Sites/pft/api/storage/app/results/9g1tx5bDuMU2XBtfhXqDrQ9VT1m6dZJJa84Sqgyx.txt): failed to open stream: Protocol error



via Victor

Advertisement