=== modified file 'tests/regressiontests/file_uploads/views.py'
|
|
|
2 | 2 | from django.core.files.uploadedfile import UploadedFile |
3 | 3 | from django.http import HttpResponse, HttpResponseServerError |
4 | 4 | from django.utils import simplejson |
| 5 | from models import FileModel |
5 | 6 | from uploadhandler import QuotaUploadHandler |
6 | 7 | from django.utils.hashcompat import sha_constructor |
7 | 8 | |
… |
… |
|
45 | 46 | if new_hash != submitted_hash: |
46 | 47 | return HttpResponseServerError() |
47 | 48 | |
| 49 | # Adding large file to the database should succeed |
| 50 | largefile = request.FILES['file_field2'] |
| 51 | obj = FileModel() |
| 52 | obj.testfile.save(largefile.name, largefile) |
| 53 | |
48 | 54 | return HttpResponse('') |
49 | 55 | |
50 | 56 | def file_upload_echo(request): |