Loading media files

Laraship QuestionsCategory: TechnicalLoading media files
danieldawson496 asked 4 years ago
Whenever i upload an image in the ecommerce platform, the response when trying to load the image is 404 not found. I have verified that the image exists and the path is correct. I have also change the permission on the file to ensure that it is publicly accessible. What may be the issue here?
2 Answers
Best Answer
laraship Staff answered 4 years ago
Hello, In case you have multiple servers, you need to have the centralized location of images, by either mounting the media folder into a shared network drive like AWS EFS, or configure S3 for the default disk for serving media.   https://spatie.be/docs/laravel-medialibrary/v3/installation-setup
laraship Staff answered 4 years ago
Hello, If the image exits and path is correct, I don't see any other reason than page does not exist other than permissions,    
laraship Staff replied 4 years ago

because this thing is a webserver and related to the application at all to serve an image

danieldawson496 replied 4 years ago

Thanks for the response, the issue was that i had multiple servers running and the image would be uploaded to one server but not replicated on the others hence why i was getting the 404. I mounted the media folder across all servers and that solved the isuue.