Skip to content
Snippets Groups Projects
Commit 614246a2 authored by Jesse Bickel's avatar Jesse Bickel
Browse files

Allow upload of mixed-case file extensions

This workaround allows mixed case file extensions. The issue appears
to be that django's `accepted_file_types.ts` does not include the
`{nocase: true}` option in its call to `picomatch.isMatch` so even
though the back-end is OK with any case, the front-end is not and
needs these extra matches. It is not sufficient to include only these
new patterns, either, because the file browser dropdown needs the
lowercase ones.

Perhaps there is a better way but this is today's "fix."

Issue ots/clients/ardc/hypha-tracker#342: Permit users to upload files
    to the Comments section of Submissions
parent 22640691
No related branches found
No related tags found
1 merge request!116Allow upload of mixed-case file extensions
Loading
  • Owner

    @jbickel The comment given in the commit message (about this being a workaround for the absence of {nocase: true} in Django) really belongs in the code, right above FILE_ALLOWED_EXTENSIONS. That way anyone who encounters this apparent oddity in the code will be able to understand what motivated it, without having to dig into the history. /CC @lilyye, since she's working on this in https://code.librehq.com/ots/clients/ardc/hypha-tracker/-/issues/389 right now.

    Edited by Karl Fogel
  • Jesse Bickel @jbickel

    mentioned in merge request !122 (closed)

    ·

    mentioned in merge request !122 (closed)

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment