Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

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

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9027 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c9f0dd1ed6277ca234af61f62bef0f86697a6cea 1 parent ea0fe60
Russell Keith-Magee authored September 14, 2008

Showing 1 changed file with 1 addition and 0 deletions. Show diff stats Hide diff stats

  1. 1  docs/topics/http/file-uploads.txt
1  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::
94 94
         destination = open('some/file/name.txt', 'wb+')
95 95
         for chunk in f.chunks():
96 96
             destination.write(chunk)
  97
+        destination.close()
97 98
 
98 99
 Looping over ``UploadedFile.chunks()`` instead of using ``read()`` ensures that
99 100
 large files don't overwhelm your system's memory.

0 notes on commit c9f0dd1

Please sign in to comment.
Something went wrong with that request. Please try again.