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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user