1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #8203 -- Fixed temporary file deleation on Windows and a couple of edge

cases on Unix-like systems. Patch from snaury. Testing and verification on
Windows, Mac and Linux from cgrady and ramikassab.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2008-08-23 17:56:02 +00:00
parent eaa64cd889
commit a9f0ae706a
3 changed files with 81 additions and 43 deletions

View File

@@ -2,6 +2,7 @@ import os
from django.core.files.uploadedfile import UploadedFile
from django.http import HttpResponse, HttpResponseServerError
from django.utils import simplejson
from models import FileModel
from uploadhandler import QuotaUploadHandler
from django.utils.hashcompat import sha_constructor
@@ -45,6 +46,11 @@ def file_upload_view_verify(request):
if new_hash != submitted_hash:
return HttpResponseServerError()
# Adding large file to the database should succeed
largefile = request.FILES['file_field2']
obj = FileModel()
obj.testfile.save(largefile.name, largefile)
return HttpResponse('')
def file_upload_echo(request):