#36719 new Bug

django.core.files.storage.base.Storage.get_availabe_name and get_alternative_name assumes that filenames contain only one dot: the dot of the extenstion.

Reported by: Abdulelah Taher Owned by:
Component: File uploads/storage Version: 5.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If I have a file named 'a.b.pdf'
then get_alternative_name would return 'a_{random}.b.pdf'
which is not correct.
the random string should between the filename and the actual extension: 'a.b_{random}.pdf'.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top