-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix: out of memory error when uploading large assets on slow internet #224
Conversation
'assetData': [assetRawUploadData] | ||
}); | ||
if(thumbnailUploadData != null) { | ||
req.files.add(thumbnailUploadData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this, it makes the code cleaner
So the cancelation mechanism is not implemented for The most sensible way is to set a boolean to return the function after the current asset is finished uploading. This is a trade-off to handle the crashing issue and I think the trade-off is something we can live with until they have better implementation of the |
It might be good to implement this library which uses Dio and uploads large files in chunk https://github.com/Taskulu/chunked_uploader/blob/master/lib/chunked_uploader.dart to keep all the functionality of Dio |
11d88cd
to
b42082c
Compare
I fixed a bug that after canceling the upload, it keeps looping once catching the error. This is good for merging now. |
This is a fix for an out of memory exception caused by uploading large assets on slow internet. Size of asset that would cause this varies based on the device.
This should should fix #54 and fix #190