#23759: Storage.get_available_name should preserve all file extensions, not just
the first one
-------------------------------------+-------------------------------------
     Reporter:  thenewguy            |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  File                 |                  Version:  1.7
  uploads/storage                    |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by timgraham):

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


Comment:

 In general, I think a period is a valid character in a filename, so we
 cannot simply assume everything to the right of the first period is the
 file extension. Some different strategies for the issue are detailed on
 [http://stackoverflow.com/questions/6525334/getting-file-extension-using-
 pattern-matching-in-python stackoverflow]. I am not sure its up to Django
 to pick one, but we could at least document the caveat and link how to
 write your own storage subclass so someone can implement the behavior they
 desire. Thoughts?

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.db45e9534bde8dcba952538ceabebc9c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to