Scenario 1: User Closes the App Midway Through Upload
If a file is 100MB which mean 20 chunks.
If the user closes the app after 10 chunks (out of 20) have been uploaded:
What happen those 10 chunks which where uploaded? Does it get deleted immediately if connection disconnected or does it get store in cache for some time? If yes, for how long?
Scenario 2: Upload Interrupted During a Chunk This only applies if Answer of above is yes.
When chunk being partial upload, let say 11th chunk and internet get disconnect or user close the app, does those partial uploaded portion of 11th chunk is stored or not ? If not, then I guess need to reuploaded the chunk 11th?
Finally, so when does the file is created in the bucket, when all the chunks being uploaded correct?
Incomplete files are not deleted.
Theoretically, it's possible to finish the upload, but the SDK doesn't support that
I mean, we can implement the work around right? Like if we know the File-id and chunk no then possible, if we break the Chunk and sent that way?
but, the main issue is,
for how does Chunk files is generally stored in the appwrite? If we never uploaded the remaing Chunks let's say 11 uploaded and 9 pending out of 20, so what happen already uploaded 11 chunks, when does those get deleted?
class UploadProgress {
/// ID of the file.
final String $id;
/// Progress percentage.
final double progress;
/// Size uploaded in bytes.
final int sizeUploaded;
/// Total number of chunks.
final int chunksTotal;
/// Number of chunks uploaded.
final int chunksUploaded;
}
using the method, Function(UploadProgress)? onProgress, was thinking to save the every successful upload state to local storage in case Upload pauses.. and so later when app open again or internet back again can resume from smae plae...
mm, I mean if we send the parital uploaded what is general time-line to reattempt the chuck upload ( is it 1hr, 1 day?) btw, in flutter sdk we do that too no utilize the? Function(UploadProgress)? onProgress method to make logic around it?
There is no time restriction.
Yes, chunked upload is the same in all SDKs.
No, you can't use on progress. Like I said, the SDKs dont support resuming an upload
Recommended threads
- Error getting preview of file
Rest Response: ``` { "message": "Server Error", "code": 500, "type": "general_unknown", "version": "1.8.1" } ``` Appwrite Logs ``` appwrite ...
- Storage images using custom domain retur...
Some of the images uploaded to my storage bucket returns this error: ``` { "message": "Project with the requested ID could not be found. Please check the value...
- Bandwidth limit for your organization ha...
I received an alert that I exceeded the Free plan bandwidth limit (showing 5.86 GB), but my dashboard tells a different story. The usage stats there are much lo...