yakovkhalinsky/backblaze-b2

finishLargeFile() behavior

Closed this issue · 3 comments

jb33k commented

Hey, I'm having troubles with finishLargeFile() and I was wondering if my structure for partSha1Array is wrong. At the moment it's basic array of [hash1, hash2, ...] but I can't get any response from finishLargeFile() and it doesn't seem to throw errors either.

Any ideas?

cbess commented

Did you supply a fileId param in the args object?

From docs:

// finish large file
b2.finishLargeFile({
    fileId: 'fileId',
    partSha1Array: [partSha1Array] // array of sha1 for each part
    // ...common arguments (optional)
}); // returns promise
jb33k commented

@cbess yes.

jb33k commented

I figured this out. The problem was that I had set my chunk size at less than 5MB which, turns out, is the required minimum size for the first part in large upload. However now I'm trying to find out how I can pass the SHA1 hash of the file with large upload. startLargeFile() doesn't seem to pass on fileInfo parameter.