Loading media files

Loading media files

Laraship QuestionsCategory: TechnicalLoading media files
danieldawson496 asked 2 weeks 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 2 weeks 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 2 weeks 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 2 weeks ago

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

danieldawson496
replied 2 weeks 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.

Happy New Year!

40% DISCOUNT ON OUR ENTIRE STORE
COUPON CODE : Hello2021
GO TO STORE
LIMITED TIME OFFER
close-link
40% Off on all of LARASHIP platforms, plugins, and themes NO EXCLUSIONS
CODE: Hello2021
close-image