[Django] #30736: Custom filename generation algorithm partially when uploading duplicate filename.

8 views
Skip to first unread message

Django

unread,
Aug 28, 2019, 12:52:58 PM8/28/19
to django-...@googlegroups.com
#30736: Custom filename generation algorithm partially when uploading duplicate
filename.
---------------------------------------------+--------------------------
Reporter: Takayuki Hirayama | Owner: nobody
Type: Uncategorized | Status: assigned
Component: Core (Other) | Version: master
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 |
---------------------------------------------+--------------------------
Django django/core/files/storage.py get_available_name() method contains
functions such as filename duplication checking, generating alternative
filename, and filename truncation.

When customize alternative filename generation algorithm, sub classes must
override all these functions in the get_available_name() method.
It is inconvenient if sub classes just customize only alternative filename
generation algorithm.

--
Ticket URL: <https://code.djangoproject.com/ticket/30736>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 28, 2019, 1:10:10 PM8/28/19
to django-...@googlegroups.com
#30736: Custom filename generation algorithm partially when uploading duplicate
filename.
-------------------------------------+-------------------------------------
Reporter: Takayuki Hirayama | Owner: Takayuki
Type: | Hirayama
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: master
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 Takayuki Hirayama):

* cc: Takayuki Hirayama (added)
* owner: nobody => Takayuki Hirayama
* type: Uncategorized => Cleanup/optimization


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

Django

unread,
Aug 28, 2019, 1:12:17 PM8/28/19
to django-...@googlegroups.com
#30736: Custom filename generation algorithm partially when uploading duplicate
filename.
-------------------------------------+-------------------------------------
Reporter: Takayuki Hirayama | Owner: Takayuki
Type: | Hirayama
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Takayuki Hirayama):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/30736#comment:2>

Django

unread,
Aug 28, 2019, 1:13:47 PM8/28/19
to django-...@googlegroups.com
#30736: Custom filename generation algorithm partially when uploading duplicate
filename.
-------------------------------------+-------------------------------------
Reporter: Takayuki Hirayama | Owner: Takayuki
Type: | Hirayama
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0

-------------------------------------+-------------------------------------
Changes (by Takayuki Hirayama):

* easy: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/30736#comment:3>

Django

unread,
Aug 28, 2019, 2:37:52 PM8/28/19
to django-...@googlegroups.com
#30736: Custom filename generation algorithm partially when uploading duplicate
filename.
-------------------------------------+-------------------------------------
Reporter: Takayuki Hirayama | Owner: Takayuki
Type: | Hirayama
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/30736#comment:4>

Django

unread,
Aug 29, 2019, 2:16:13 AM8/29/19
to django-...@googlegroups.com
#30736: Custom filename generation algorithm partially when uploading duplicate
filename.
-------------------------------------+-------------------------------------
Reporter: Takayuki Hirayama | Owner: Takayuki
Type: | Hirayama
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* needs_docs: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/30736#comment:5>

Django

unread,
Aug 30, 2019, 4:51:01 AM8/30/19
to django-...@googlegroups.com
#30736: Custom filename generation algorithm partially when uploading duplicate
filename.
-------------------------------------+-------------------------------------
Reporter: Takayuki Hirayama | Owner: Takayuki
Type: | Hirayama
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* needs_docs: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/30736#comment:6>

Django

unread,
Aug 30, 2019, 5:49:44 AM8/30/19
to django-...@googlegroups.com
#30736: Custom filename generation algorithm partially when uploading duplicate
filename.
-------------------------------------+-------------------------------------
Reporter: Takayuki Hirayama | Owner: Takayuki
Type: | Hirayama
Cleanup/optimization | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"05457817647368be4b019314fcc655445a5b4c0c" 0545781]:
{{{
#!CommitTicketReference repository=""
revision="05457817647368be4b019314fcc655445a5b4c0c"
Fixed #30736 -- Added Storage.get_alternative_name() to allow
customization.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30736#comment:7>

Django

unread,
Aug 31, 2019, 1:28:57 AM8/31/19
to django-...@googlegroups.com
#30736: Custom filename generation algorithm partially when uploading duplicate
filename.
-------------------------------------+-------------------------------------
Reporter: Takayuki Hirayama | Owner: Takayuki
Type: | Hirayama
Cleanup/optimization | Status: closed
Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"6201141b2ccfc54874cb43158daae0efd49afa23" 6201141b]:
{{{
#!CommitTicketReference repository=""
revision="6201141b2ccfc54874cb43158daae0efd49afa23"
Refs #30736 -- Added missing versionadded annotations for
Storage.get_alternative_name().

Thanks Simon Charette for the report.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30736#comment:8>

Reply all
Reply to author
Forward
0 new messages