Profile picture uploads cause 500 error due to randomised file extensions #788
Labels
hot-fix
quick software update or code change that fixes a bug or defect in a live system
medium priority
User story: As a user of lowFAT, I want my uploaded profile pictures to display correctly without errors, so that the Fellows’ profiles pages are fully functional and visually complete.
Description: When a user or admin uploads a profile picture for a Fellow's account in lowFAT, the image file name is saved with a random string appended to the extension (e.g., photos/profilepic_kxxJUOf.jpg). However, the system attempts to retrieve the image using a different file path (e.g., photos/profilepic.jpg), causing a 500 error when the image is not found. After a few refreshes, the page loads but with broken links for the profile pictures. This is causing secondary problems in clicking through on the Fellow's page.
Acceptance criteria:
The text was updated successfully, but these errors were encountered: