#19036: Big base64-encoded files uploading --------------------------------------+-------------------- Reporter: anthony@… | Owner: nobody Type: Bug | Status: new Component: File uploads/storage | Version: master Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------------+-------------------- I'm trying to upload image file using ajax & browser FileReader.readAsDataURL API. In most cases it fails with `MultiPartParserError: Could not decode base64 data: Error('Incorrect padding',).` When django cut of header from 'multipart/form-data' part with encoded file data, it does not check length of the remaining data and pass it to decoder. Length of passed data is `(FileUploadHandler chunk size) - (removed header length)` which is not divides by 4 in most cases. It is reproduced by testcase I attached. It is based on standard Django test_base64_upload test but reads 512Kb from /dev/urandom instead of short string.
-- Ticket URL: <https://code.djangoproject.com/ticket/19036> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.