#2070: [patch] Large streaming uploads
----------------------------------------+-----------------------------------
Reporter: [EMAIL PROTECTED] | Owner: jacob
Status: assigned | Component: Core framework
Version: | Resolution:
Keywords: streaming, upload, large | Stage: Accepted
Has_patch: 1 | Needs_docs: 1
Needs_tests: 0 | Needs_better_patch: 1
----------------------------------------+-----------------------------------
Comment (by Michael Axiak <[EMAIL PROTECTED]>):
Replying to [comment:111 Øyvind Saltvik <[EMAIL PROTECTED]>]:
> Axiak
>
> But does this not limit streaming to gnu os'es by using shutils. Should
it not try shutils first, dont import shutils at the top of the .py Then
try rename, and finally just write from file['content'] if that fails.
I did not know it only worked in GNU os's. Also, AFAIK, there's no OS-
independent way to copy files in python, and if file streaming was
enabled, file_field['content'] will not have the desired content. Thus,
the only sure-fire way to make it work is to do a file.write file.read
combination. Luckily it probably won't have to do this, since it will try
both ``shutils`` and ``os.rename`` before it gets to that point.
--
Ticket URL: <http://code.djangoproject.com/ticket/2070#comment:112>
Django Code <http://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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---