Open thisandagain opened 5 years ago
/cc @kchadha @colbygk
/cc @rschamp
There are a few error codes that we may respond with after saving a project. These won't result in any err
being returned in the request, but we should know to check for them to show an appropriate status to the user.
I created https://github.com/LLK/scratch-projects/issues/120 to help with this.
When trying to save a scratch project with very large list the editor will say it is saved, but in reality the server rejects the request with 413 PayloadTooLarge. In 2.0 project code was allowed to be up to 20 MB, this project's code is 5.71 MB. The number of entries I put in the list was approximately 93,000. (Trying to code a project to read 3D printer gcode files.) While I understand the need to put a size limit on everything, lists are already limited to having 200,000 items, and less than 5 MB of space for projects that need more complicated data structures isn't that much.
Steps to Reproduce
I'm not sure exactly what the server's cutoff is, but importing a 2.9 MB text file into a list caused the issue. It is not immediately apparent as the editor gives no indication of the failure and says it saved successfully. This can also be simulated by using a forever loop to make a string longer, as the 10240 cap on string characters has been removed. A few seconds of running that yielded another project that pretends to save.
Operating System and Browser
Intel Mac OS X 10.14.0 Chrome/71.0.3578.98 OS shouldn't matter, can confirm the request is being rejected server side for being large.
Moved from LLK/scratch-www#2670 /cc @GreenScripter