Pictures are in the wrong directory #59

Open
opened 2022-01-01 21:19:59 +01:00 by reverend · 1 comment
Collaborator

On instances with DEBUG=False pictures (cropped by easy_thumbnails) are not displayed. This is because the thumbnail_cleanup command in manage.py does not work properly:

django.core.exceptions.SuspiciousFileOperation: The joined path (/home/leo/Git/lostplaces-backend/django_lostplaces/uploads/places/1-placename.jpg) is located outside of the base path component (/home/leo/Git/lostplaces-backend/django_lostplaces/uploads/thumbs)

On an already existing instance the cropped are there, but are in the wrong folder. The settings for THUMBNAIL_MEDIA_ROOT, THUMBNAIL_MEDIA_URL and the upload of place images need to be refactored. Also already existing images might have to be moved to the correct folder within the MEDIA_ROOT, this might be a thing for migrations.

On instances with `DEBUG=False` pictures (cropped by easy_thumbnails) are not displayed. This is because the *thumbnail_cleanup* command in manage.py does not work properly: ``` django.core.exceptions.SuspiciousFileOperation: The joined path (/home/leo/Git/lostplaces-backend/django_lostplaces/uploads/places/1-placename.jpg) is located outside of the base path component (/home/leo/Git/lostplaces-backend/django_lostplaces/uploads/thumbs) ``` On an already existing instance the cropped are there, but are in the wrong folder. The settings for `THUMBNAIL_MEDIA_ROOT`, `THUMBNAIL_MEDIA_URL` and the upload of place images need to be refactored. Also already existing images might have to be moved to the correct folder within the `MEDIA_ROOT`, this might be a thing for migrations.
reverend added the
Change
HotFix Required
Issue
Major
labels 2022-01-01 21:20:00 +01:00
reverend self-assigned this 2022-01-01 21:20:00 +01:00
Commander1024 was assigned by reverend 2022-01-01 21:20:01 +01:00
Author
Collaborator

Attempted Fix in 830120a929, still needs to be tested under different cricumstances.

Attempted Fix in 830120a929, still needs to be tested under different cricumstances.
Sign in to join this conversation.
No Milestone
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Commander1024/lostplaces-backend#59
No description provided.