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
Loading
-
@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 aboveFILE_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 -
mentioned in merge request !122 (closed)
Please register or sign in to comment