Skip to content
This repository was archived by the owner on Jan 23, 2021. It is now read-only.

Media Library rejects uploaded files if file has an uppercase extension #197

Open
Pi2048 opened this issue Oct 7, 2017 · 3 comments
Open
Labels

Comments

@Pi2048
Copy link

Pi2048 commented Oct 7, 2017

Steps to reproduce:

  • Login and go to the Media Library
  • Click 'Upload'
  • Choose a file with a name that ends in '.JPG' (note the uppercase)
  • Try to upload it

It yields an error about allowed extensions. However, .jpg is accepted. We should accept all upper-, lower- and mixed-case versions of extensions that we allow.

@Pi2048 Pi2048 added the bug label Oct 7, 2017
@Pi2048 Pi2048 self-assigned this Oct 7, 2017
@Pi2048
Copy link
Author

Pi2048 commented Oct 7, 2017

Seems to be a filebrowser(_safe) issue, submitted it there: stephenmcd/filebrowser-safe#100.

@bartromgens
Copy link
Member

This is indeed a issue in the mezzanine filebrowser version. Your suggestion to fix it seems the best way to go.

We can 'fix' it on our end by extending the FILEBROWSER_EXTENSIONS setting:

FILEBROWSER_EXTENSIONS = {

with upper case versions, but that is rather ugly work-around and still does not work for mixed upper and lower case extensions (although rare).

We can also fix the issue in filebrowser-safe and submit a PR if it is not handled in time, and it is easy to fix (the comment 'Lower case is important' is a bit strange). Might be a nice way to give something back.

@Pi2048
Copy link
Author

Pi2048 commented Oct 9, 2017

This was apparently fixed in a more recent version of filebrowser_safe: stephenmcd/filebrowser-safe@761421f. Let's upgrade and see whether the issue persists.

@Pi2048 Pi2048 removed their assignment Oct 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants