Location images not loading on view page
Please confirm you have done the following before posting your bug report:
- [x] I have enabled debug mode
- [x] I have read checked the Common Issues page
Describe the bug The location view page does not show the uploaded location image
To Reproduce Create a new location Upload an image for the location The image is only visible on the edit location page and settings > locations list The image is not visible on the location view page
The location view page for location #46 in the database (HTTP://yoursnipeitserver/locations/46) The image URL on this page is listed as "HTTP://yoursnipeitserver/locations/locations//location-image-Mg3XB4lkJI.png" The image does not load
The location edit page for location #46 in the database (HTTP://yoursnipeitserver/locations/46/edit) The image URL is listed as "HTTP://yoursnipeitserver/uploads/locations/location-image-Mg3XB4lkJI.png" The image does load
Expected behavior I expect the location view page to load the image
Server (please complete the following information):
- Snipe-IT Version v5.0.4 build 5452 (gc93f4ef0d)
- OS: [e.g. Ubuntu, CentOS] Ubuntu
- Laravel Version 6.18.10
- PHP Version 7.4.3
Desktop (please complete the following information):
- OS: [e.g. iOS] Win10
- Browser [e.g. chrome, safari] Chrome & Firefox
- Version [e.g. 22] Version 86.0.4240.111 & 82.0.2
Error Messages If I paste the image URL into a new tab I get the following error:
404 Page not found.
Sad panda. We could not find the page you were looking for.
Additional context Fresh install Followed instructions from here: https://www.skau.dk/?page_id=198
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
I have the same issue on Windows Server.
Please note that this in my opinion is not a fix but rather a workaround.
My workaround was to copy the locations folder from yoursnipe-itroot\public\uploads\locations folder and place them in yoursnipe-itroot\public\locations\locations folder.
Thanks for the info, your workaround worked for me too.
My workaround was to copy the locations folder from yoursnipe-itroot\public\uploads\locations folder and place them in yoursnipe-itroot\public\locations\locations folder.
This is not a long-term solution, as anything new that gets uploaded there will not be uploaded to the correct spot.
I'll have a fix out for you on master shortly.