#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 claudep):

 Wrapping `StringIO` in a `File` object should work. Report it as a
 separate ticket if you can show that it does not.

 Maybe the simplest fix would be to wrap `content` in a `File` object if it
 has no chunks method. This would preserve compatibility in the case
 someone passes a custom `content` instance (which might implement chunks
 in a non-standard way).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18899#comment:4>
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