No proper error message when FILE_FORM_MAX_FILE_SIZE excceded
sebhaase opened this issue · 6 comments
Trying to upload a file larger than FILE_FORM_MAX_FILE_SIZE, apparently fails silently without any explanation.
I'll have a look
I couldn't reproduce the error:
FILE_FORM_MAX_FILE_SIZE = 1000
(bytes)- I upload a file of 7 MB
- The upload succeeds. No error.
Possible explanations for your error:
- It's possible that the error you get is related to the chunk size. See the
chunkSize
option: http://mbraak.github.io/django-file-form/javascript_options/ - Perhaps you're using a different version of django-file-form or Django. I uses django-file-form 3.2.1 and Django 3.2.3
- I tested this using a development server (
manage.py runserver
).
Are you saying FILE_FORM_MAX_FILE_SIZE is practically ignored? All I could find was that the value is put in some TUS header. I was expecting that in the onProcess (PATCH) it would immediately bail out as soon as the known (to be) uploaded file size is larger than FILE_FORM_MAX_FILE_SIZE.
Yes, that is also what I expected. The Tus-Max-Size
value is added to the request, but it's ignored by the javascript upload library (https://github.com/tus/tus-js-client). Also see #464.
Would you like to limit the file size? Perhaps there is an alternative to Tus-Max-Size
.
In any case the option could be remove, it it doesn't do anything.... maybe I has a completetly differnt reasor why the upload aborted and I just assumed it was "near" the max_file_size limit... so then ignore this ticket as "user mistake".
ok, thanks