New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File upload through API returns Internal server error #1531
Comments
Huh. It appears to be caused by the
With the
without it, no error:
Stack trace in |
…sues If a content type header was present on a multipart form data part it would turn the rewritten body into a unicode instead of a byte array, causing a later conversion to a byte stream to not capture. Fixed both the fact that the rewritten body would turn into unicode by making sure the content type header was provided as byte array and fixed the byte stream conversion to also trigger on unicode instances. Solves #1531
Fixed on |
Wow, that was quick! Thanks for the effort 👍 |
Forgot to close this when 1.2.17 was released |
What were you doing?
I'm trying to use the OctoPrint API to upload files to the local folder on the RaspberryPi running OctoPrint. Here's an example request: http://pastebin.com/iLGHQSSu
Here's the GCODE: https://drive.google.com/file/d/0BybDJjp-fX5wX0ZjWnJtckhiLUE/view?usp=sharing
What did you expect to happen?
The file to be uploaded to RaspberryPi.
What happened instead?
The request returns HTTP 500, Internal server error. According to web UI, file upload wasn't successful. The error from octoprint.log:
Branch & Commit or Version of OctoPrint
Version: 1.2.16 (master branch)
Link to octoprint.log
http://pastebin.com/vRwEFHD3
I have read the FAQ.
The text was updated successfully, but these errors were encountered: