Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#36719 closed Bug (duplicate)

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

Reported by: Abdulelah Taher Owned by: Vishy Algo
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 (4)

comment:1 by Vishy Algo, 3 weeks ago

Owner: set to Vishy Algo
Status: newassigned

comment:2 by Jacob Walls, 3 weeks ago

Hi, thanks for the report. If there is an issue here, I think it would be addressed by #35818, which I will reopen.

comment:3 by Jacob Walls, 3 weeks ago

Resolution: duplicate
Status: assignedclosed

comment:4 by Jacob Walls, 3 weeks ago

Summary: 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.django.core.files.storage.base.Storage.get_available_name and get_alternative_name assumes that filenames contain only one dot: the dot of the extension.
Note: See TracTickets for help on using tickets.
Back to Top