#18899: FileSystemStorage.save should support any file-like objects
--------------------------------------+------------------------------------
     Reporter:  vzima                 |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  File uploads/storage  |                  Version:  1.4
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by vzima):

 Replying to [comment:2 claudep]:
 > In #15644, we added support for file-like objects to the File wrapper.
 Do you think it is still too much to call `storage.save(target, File
 (<file-like-object>))`?
 Yes. It is seems fairly excessive - you make `File` object from `file`
 object - only to provide `chunks()` method. Also this is not a solution
 for other file-like objects, e.g. `StringIO`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18899#comment:3>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to