Browse files

Fixed #9075: Added a call to close() in the example file upload hand…

…ler. Thanks to Brendan (bmsleight) for the suggestion.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
freakboy3742 committed Sep 14, 2008
1 parent ea0fe60 commit c9f0dd1ed6277ca234af61f62bef0f86697a6cea
Showing with 1 addition and 0 deletions.
  1. +1 −0 docs/topics/http/file-uploads.txt
@@ -94,6 +94,7 @@ Putting it all together, here's a common way you might handle an uploaded file::
destination = open('some/file/name.txt', 'wb+')
for chunk in f.chunks():
+ destination.close()
Looping over ``UploadedFile.chunks()`` instead of using ``read()`` ensures that
large files don't overwhelm your system's memory.

0 comments on commit c9f0dd1

Please sign in to comment.