Home > Back-end >  Laravel project hosting: file uploads and images directory
Laravel project hosting: file uploads and images directory

Time:11-01

I am done with a Laravel project and I plan to host it on AWS EC2. I am still learning how that works. My project includes file uploading. I upload my files in Laravel's public folder. Similarly, I store some images in the public folder and use laravel's asset function in the img tag to retrieve it. I am worried nonetheless that these paths would not be recognized when I host my application. Am I using the correct directory to store my images and uploaded files?

If not which local directory should the images and files be stored?

CodePudding user response:

public folder is correct and it will automatically access in images just in case if your images not accessible then you need to run a command php artisan storage:link it will link your folder as storage and then you need to make storage folder permission to 777 then it will work.

  • Related