Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30736 closed Cleanup/optimization (fixed)

Custom filename generation algorithm partially when uploading duplicate filename.

Reported by: Takayuki Hirayama Owned by: Takayuki Hirayama
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Takayuki Hirayama Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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.

Change History (8)

comment:1 by Takayuki Hirayama, 5 years ago

Cc: Takayuki Hirayama added
Owner: changed from nobody to Takayuki Hirayama
Type: UncategorizedCleanup/optimization

comment:2 by Takayuki Hirayama, 5 years ago

Has patch: set

comment:3 by Takayuki Hirayama, 5 years ago

Easy pickings: set

comment:4 by Claude Paroz, 5 years ago

Triage Stage: UnreviewedAccepted

comment:5 by Mariusz Felisiak, 5 years ago

Needs documentation: set

comment:6 by Mariusz Felisiak, 5 years ago

Needs documentation: unset

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 0545781:

Fixed #30736 -- Added Storage.get_alternative_name() to allow customization.

comment:8 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 6201141b:

Refs #30736 -- Added missing versionadded annotations for Storage.get_alternative_name().

Thanks Simon Charette for the report.

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