uxweb's avatar
Level 20

Can't move an uploaded file as seen on Project Flyer - Bulk File Uploads

Hi friends!!

I am following the great series of the Flyer Project but i am having a problem when moving the uploaded photo to the base directory, PHP throws a FileException that says:

Unable to create the "/flyers/photos" directory

I am using homestead without any mod or change of directory/file permissions, just the default that comes with it.

I even tried to change the public directory permissions to 777 but even with that it still throws the same exception.

NOTE: if i prepend the 'flyers/photos' with public_path() it does create the directories and moves the photo, but as seen in the lesson "Bulk File Uploads" Jeffrey is not prepending his base directory.

Is there something i'm missing to do here?

Thanks for your help!

0 likes
4 replies
uxweb's avatar
Level 20

Do anyone is having this issue?

Could you suggest something else i can do or check for?

Thanks

layer7's avatar
layer7
Best Answer
Level 24

Are you using /flyers/photos or flyers/photos? the vagrant user won't have permission to create /flyers/photos as that's absolute and on the root of the filesystem. If you use flyers/photos however, it's relative and it should work.

uxweb's avatar
Level 20

@layer7 i am using /flyers/photos. as you suggest i'll make a try with flyers/photos.

thank you!

uxweb's avatar
Level 20

@layer7 Yes, it works like that!!, now i make my mind around it and how i was trying to do it.

Thank you very much!!

Please or to participate in this conversation.