0

In my model I have to file fields:

video_file_for_proc = models.FileField(upload_to=get_video_upload_path)
video_file = models.FileField(upload_to=get_video_upload_path)

The videos I upload are about 20MB, so 40 in summ. When I save my standard admin form it tries tries and then I get "The connection was reset" in browser. No errors in debug console :( . I played around changing DATA_UPLOAD_MAX_MEMORY_SIZE and FILE_UPLOAD_MAX_MEMORY_SIZE, but that did not help. When I experiment with smaller files (some random txt) it works. How can I fix this?

trshmanx
  • 600
  • 7
  • 16

1 Answers1

2
DATA_UPLOAD_MAX_MEMORY_SIZE = 512545
FILE_UPLOAD_MAX_MEMORY_SIZE = 512545

Here such caviar will help. If it does not help, then check from another browser. Besides, another question is, why are you uploading two files at once? Try one upload

Maximum file upload on the server may also be limited. If you are using NGinx, add client_max_body_size 350m; at http block or change the value if exists.

Maybe you can increase using a .htaccess file on Apache Web Server.

memory_limit = 5120M
upload_max_filesize = 5120M
post_max_size = 5120M