Replies: 5 comments 8 replies
-
That look nice.. I suggest you to use return send_file ("x.html") you can deal with very big data and there's a discussion group on Miguel microdot git |
Beta Was this translation helpful? Give feedback.
-
I understand that you are receiving a file. Memory may be too fragmented. Doing gc.collect() more frequently may alleviate that. On the other hand, have you looked at the max_body_length parameter of the Request class? Setting that to 0 lets receive the file as a Stream object, which is much less memory intensive. You process the file as it is received. |
Beta Was this translation helpful? Give feedback.
-
Using uploads_async.py example work perfectly with big files (5Mb), sending the upload to sd card... if not for you try with small ftp server |
Beta Was this translation helpful? Give feedback.
-
Don't understand what you want to do.. if you want to upload file with microdot on your server (board), look at the example uploads_async.py for the server and the index.html for the client.. |
Beta Was this translation helpful? Give feedback.
-
Ok try Miguel upload example as i tell you and look if you've got same error. Reduce the file size still it work ... after that to have more memory it's very simple declare microdot files in manifest.py and compil micropython.. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Before I start, I have enough space left in the ESP32. here is a mem_info()
Anyone faced issue where loading file more than 4/5KB shows "MemoryError: memory allocation failed"?
What I am doing is, set up a webserver using microdot. then trying to read data. data is coming as form-data as a data field and file. currently
using postman to test.
As it seems, I can read data as big as 4-5KB but more than that it shows me memory error. I already incresed content length, body length in Request class too.
Here is a snippet of my code and error:
The error I receive is:
any advice would be appreciate to get some insight on this.
Beta Was this translation helpful? Give feedback.
All reactions