-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Description
Uploaded files with an ampersand (&) in their name fail to rename or delete.
To recreate for deletion:
- Upload an image with an ampersand (&) in the title
- Try to delete the image
- The image is reported as having been deleted, but remains in the system
To recreate for renaming (file is called "pantry_&_kitchen.jpeg"):
- Upload an image with an ampersand (&) in the title
- Click the icon to rename the image
- Apply a new name and slick "submit"
- The following error appears:
IOError at /admin/media-library/rename/
[Errno 2] No such file or directory: u'/home/ubuntu/media/uploads/products/pantry_'
I fixed the deletion issue locally, it appears that tagging file.filename with |urlencode does the trick. I applied it to lines 89 and 101 in templates/filebrowser/include/filelisting.html and am able to delete images.
I haven't figured out how the query_string tag works to fix the encoding there, but it seems like the fix would need to be applied there and maybe in templates/filebrowser/rename.html.
Metadata
Metadata
Assignees
Labels
No labels