Staging instance, all changes can be removed at any time

Skip to content

Disambiguate uploaded files with a prefix instead of a suffix.

Django tries to add the suffix before the extension, but it doesn't account for compound extensions, so 'foo.tar.gz' becomes 'foo.tar_XXXXXXX.gz', which messes with shutil's file type detection.

Using a prefix instead solves this issue.

Resolves #2393 (closed).

Test Plan

I can't reproduce the exact issue in a test for some reason, but we already have a function checking the name, so that should be good enough.


Migrated from D3192 (view on Phabricator)

Merge request reports

Loading