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
- Storage files aren’t showing on mobile
hi, what can be the problem? i have a storage and there are images in it, the permissions are read for All Users, everything is fine on desktop, but on mobile t...
- Delete storage files all at once
I am using Appwrite Cloud. I want to delete all storage files in my bucket similar to how I can select all documents in a collection and delete them all at once...
- Storage images are not showing on mobile
Hi, can anyone help me? I have some images on the storage, and it is not shown on mobile, on desktop everything is fine.