id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 19036 Big base64-encoded files uploading anthony@… nobody "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." Bug closed File uploads/storage dev Release blocker fixed Ready for checkin 1 0 0 0 0 0