Sunday, December 13, 2009

Understanding of File Upload in Django

Hi,

can somebody explain me how file upload works in Django?
I read this documentation: http://docs.djangoproject.com/en/dev/topics/http/file-uploads/

And there is this part:
###################################################################################################################################################################

Where uploaded data is stored

Before you save uploaded files, the data needs to be stored somewhere.

By default, if an uploaded file is smaller than 2.5 megabytes, Django will hold the entire contents of the upload in memory. This means that saving the file involves only a read from memory and a write to disk and thus is very fast.

###################################################################################################################################################################

What does it mean by "saving the file involves only read from memory and a write to disk..."?
I though uploading and saving a file are one process. When I upload a file by submiting my form it means it will also save the file somewhere.

But what I understand from the documentation is uploading and saving are two different processes. How can I trigger the saving then?


Regards,

Steve

--

You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate