morganchorlton3's avatar

Uploading Images on server

Hi all, i have been working on my project and have decided to move my application to a live server (using php deployer package for laravel ) https://github.com/lorisleiva/laravel-deployer

and when i try to create a product and upload an image i get this error

Unable to create the "/var/www/domain.com/releases/3/public/uploads/products/DC-P03/" directory

the code im using

$imageFile->move(public_path() . '/uploads/products/' . $genSlug . '/', $name);

am i wrong in thinking the file should be uploaded to current/public/uploads/products?

0 likes
4 replies
Snapey's avatar

Your web server needs permissions to write to the public folder. Instructions for which are OS dependent

jove's avatar

@morganchorlton3 Etc if you are running apache. Google: "Give apache write access to folder ubuntu" And you will find guides on how to do this.

EDIT: Removed miss guidance.

Please or to participate in this conversation.