Last modified: 2013-04-22 16:15:41 UTC
Created attachment 11769 [details] The chunked upload request. I'm getting a '500 Internal Server Error' error when attempting to do a chunked upload via the commons API. I've attached the request/response with cookie/token removed. (I also spoof the IE browser for testing). What would a proper raw chunked upload request look like?
Created attachment 11770 [details] Response
Created attachment 11771 [details] File in request
File size = 2,985,402 bytes
I fixed it by including filename for the chunk param even though it's not used: ------------------------------90583427db83 Content-Disposition: form-data; name="chunk"; filename="something" Content-Type: application/octet-stream Content-Transfer-Encoding: binary It should give some sort of error as opposed to a 500.
Without the filename in the chunk parameter, PHP doesn't recognize it as a file upload field. So it tries to process this long chunk of data as if it were a text field, and runs out of memory while trying to run Unicode normalization over it. But yeah, it would also be nice if the API would recognize that the file upload field is not actually being recognized as a file upload and give an error message rather than even trying to fetch it as a text field.
Gerrit change #51041
Change merged