Closed DilankaW closed 8 years ago
I can't find anything about a file limit for gcode uploads. I have requested more info on the error using the forums. It could be the the long file upload is being stopped because is not chunked which will be another feature to add
It seems to be a limit here is the http error :
Failed to load resource: the server responded with a status of 502 (Bad Gateway)
http://astrobox.local/api/files/local Failed to load resource: net::ERR_CONNECTION_RESET
And me too, I didn't see limit in source files. I searched for a '502' error declaration and didn't find it in sources.
It should be a default error emitted by the http server in python himself.
What do you think about that : http://webpy.org/cookbook/limiting_upload_size But as I only have coded little scripts in python, I don't know which file I have to edit to add this declaration.
As you can see on the screenshot, 65Mb is not a problem for local uploads.
And the shown error is when I try to upload the one-day-to-print
file.
Thanks @G33kLabs. I think it has more to do with the time it takes to upload the file than the size itself. Could you measure the time elapsed between the start of your upload and the error?
Instantly
Then I'm obviously wrong ;) I'll keep digging
Yes it looks really like an upload limit. As I read that cgi is used by python, I think that the limitation can be changed and that your source use defaults which should be around 100MB.
Two of my thinks to resolve this issue :
Increment cgi param :
MAX_CONTENT_LENGTH => 157286400 (150 MB)
import cgi
# Maximum input we will accept when REQUEST_METHOD is POST
# 0 ==> unlimited input
cgi.maxlen = 150 * 1024 * 1024 # 150MB
But I'm really not a python developer, so perhaps I'm on a wrong way, perhaps it's the good one... :)
You almost had it ;) It was a Tornado setting, the webserver we use and it was defaulting to 100MB. I have increased it to 160MB, it'll go out in the next release of the AstroBox software.
Great !! Can you send me instructions to change it on my astrobox, I can't wait for the next release :)
Thanks !
The above commit has the code changes but the code in your astrobox is "compiled" python... You won't have to wait long for a new release. I think this week
Ok... Just look at the /Astrobox/src files and nope I can't edit them :) Take care of the commented routes in your last commit and thank you for the update !
I am trying to upload a 234MB file, where is the setting to change to make this work?
@cbgj It's currently hardcoded but I have created a task to implement this in the next release:
Per this thread, this is a request to increase the maximum file size of GCODE file(s) to 150MB when uploading to the local AstroBox.