[Django] #36719: 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.

11 views
Skip to first unread message

Django

unread,
Nov 9, 2025, 2:07:09 AMNov 9
to django-...@googlegroups.com
#36719: 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.
-------------------------------------+-------------------------------------
Reporter: Abdulelah Taher | Type: Bug
Status: new | Component: File
| uploads/storage
Version: 5.2 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
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'.
--
Ticket URL: <https://code.djangoproject.com/ticket/36719>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 9, 2025, 11:09:19 AMNov 9
to django-...@googlegroups.com
#36719: 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.
-------------------------------------+-------------------------------------
Reporter: Abdulelah Taher | Owner: vishy
Type: Bug | Status: assigned
Component: File | Version: 5.2
uploads/storage |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by vishy):

* owner: (none) => vishy
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/36719#comment:1>

Django

unread,
Nov 10, 2025, 9:24:56 AMNov 10
to django-...@googlegroups.com
#36719: 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.
-------------------------------------+-------------------------------------
Reporter: Abdulelah Taher | Owner: vishy
Type: Bug | Status: assigned
Component: File | Version: 5.2
uploads/storage |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):

Hi, thanks for the report. If there is an issue here, I think it would be
addressed by #35818, which I will reopen.
--
Ticket URL: <https://code.djangoproject.com/ticket/36719#comment:2>

Django

unread,
Nov 10, 2025, 9:25:12 AMNov 10
to django-...@googlegroups.com
#36719: 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.
-------------------------------------+-------------------------------------
Reporter: Abdulelah Taher | Owner: vishy
Type: Bug | Status: closed
Component: File | Version: 5.2
uploads/storage |
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* resolution: => duplicate
* status: assigned => closed

--
Ticket URL: <https://code.djangoproject.com/ticket/36719#comment:3>
Reply all
Reply to author
Forward
0 new messages