[Django] #23183: Use timestamp when uploading duplicate filenames

5 views
Skip to first unread message

Django

unread,
Aug 4, 2014, 12:05:25 PM8/4/14
to django-...@googlegroups.com
#23183: Use timestamp when uploading duplicate filenames
--------------------------------------+--------------------
Reporter: areski | Owner: nobody
Type: New feature | Status: new
Component: File uploads/storage | Version: master
Severity: Normal | Keywords: upload
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
When Uploading duplicate filenames, we use incremental method to determine
the new filename, this method can slowly worsens over time if there is
many files of the same name (ref
https://code.djangoproject.com/ticket/23157) and it also give anyone
informations about the files already uploaded.

This patch provide an easy way to obfuscated the names of the already
uploaded files, which I think, may be the desired behavior we may want by
default `at some stage`.
The global setting FILE_UPLOAD_USETIME_DUPLICATE try to remedy to this.

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

Django

unread,
Aug 4, 2014, 12:08:09 PM8/4/14
to django-...@googlegroups.com
#23183: Use timestamp when uploading duplicate filenames
-------------------------------------+-------------------------------------

Reporter: areski | Owner: nobody
Type: New feature | Status: new
Component: File | Version: master
uploads/storage | Resolution:
Severity: Normal | Triage Stage:
Keywords: upload | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by areski):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

PR: https://github.com/django/django/pull/3018

This is a PoC, I will fix the tests if this is accepted.

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

Django

unread,
Aug 4, 2014, 1:28:42 PM8/4/14
to django-...@googlegroups.com
#23183: Use timestamp when uploading duplicate filenames
-------------------------------------+-------------------------------------

Reporter: areski | Owner: nobody
Type: New feature | Status: new
Component: File | Version: master
uploads/storage | Resolution:
Severity: Normal | Triage Stage:
Keywords: upload | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timo):

I think adding a hash rather than a timestamp (or even an option to
replace the filename with a hash) would be a better solution. Users may
not want to leak the time a file was uploaded. Adding a new setting is
usually a no go if there is a way to avoid it, but perhaps the setting
could be transitional as you've noted. It would be good to discuss this
ticket on the DevelopersMailingList.

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

Django

unread,
Aug 4, 2014, 2:45:19 PM8/4/14
to django-...@googlegroups.com
#23183: Use timestamp when uploading duplicate filenames
-------------------------------------+-------------------------------------

Reporter: areski | Owner: nobody
Type: New feature | Status: new
Component: File | Version: master
uploads/storage | Resolution:
Severity: Normal | Triage Stage:
Keywords: upload | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by areski):

Thanks for the feedback, a suggested I opened a discussion here
https://groups.google.com/forum/#!topic/django-developers/rjZbo4_W9jU

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

Django

unread,
Aug 8, 2014, 2:25:26 PM8/8/14
to django-...@googlegroups.com
#23183: Use timestamp when uploading duplicate filenames
-------------------------------------+-------------------------------------
Reporter: areski | Owner: nobody
Type: New feature | Status: closed
Component: File | Version: master
uploads/storage | Resolution: duplicate

Severity: Normal | Triage Stage:
Keywords: upload | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

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


Comment:

We will address this in the fix for #23157. I am working on a patch.

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

Reply all
Reply to author
Forward
0 new messages