cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Url of the file instead of a buffer in uploadSessionAppendV2?

Explorer | Level 4

Is it possible to send url to the file in call to sessionappendv2 or sessionstart. The reason is that whenever I try to upload files in sequence, I am getting memory leaks in node, becase it keeps the result  of reedFile() in memory, which I must call sequentally. If sum of all parts of splitted file is bigger than 500mb it throws `FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory`

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Url of the file instead of a buffer in uploadSessionAppendV2?

Dropboxer
Dropboxer

No, unfortunately the API v2 JavaScript SDK only supports supplying the file content as string or buffer, but I'll be sure to pass this along as a feature request.

 

The incorrect_offset error is documented as:

 

"The specified offset was incorrect. See the value for the correct offset. This error may occur when a previous request was received and processed successfully but the client did not receive the response, e.g. due to a network error."

 

Your sample has the server just a few bytes behind the client though, so it's likely not due to a missed response as in the example in the documentation.

 

Instead, you may not be supplying the length of data you expect, or there may otherwise be some logic error in your upload session code. I recommend adding some extra logging to your code to see when/where the missing data is occuring.

View solution in original post

2 Replies 2
Highlighted

Re: Url of the file instead of a buffer in uploadSessionAppendV2?

Explorer | Level 4

2. Also I have a problem with incorrect_offset error. It seems that the error is in order of few bytes. For example  I am sending offset value as 426046040, but getting error with info "correct_offset" : 426046036. Just 4 bytes. 
And when I upload some other file, the difference is 1 byte.

Highlighted

Re: Url of the file instead of a buffer in uploadSessionAppendV2?

Dropboxer
Dropboxer

No, unfortunately the API v2 JavaScript SDK only supports supplying the file content as string or buffer, but I'll be sure to pass this along as a feature request.

 

The incorrect_offset error is documented as:

 

"The specified offset was incorrect. See the value for the correct offset. This error may occur when a previous request was received and processed successfully but the client did not receive the response, e.g. due to a network error."

 

Your sample has the server just a few bytes behind the client though, so it's likely not due to a missed response as in the example in the documentation.

 

Instead, you may not be supplying the length of data you expect, or there may otherwise be some logic error in your upload session code. I recommend adding some extra logging to your code to see when/where the missing data is occuring.

View solution in original post

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?