I am trying to do chunk upload on Dropbox using Python. My problem is that I don't necessary have access to the file, I can't always get a file handler.
I always have a string containing the chunk I need to upload. But the problem is that client.upload_chunk requires a file like object, and I don't understand how the /chunked_upload on the HTTP API works. How do you precise the filename?
Here is how I do it right now:
e, upload_id = self.client.upload_chunk(chunk, len(chunk), offset)
print "Uploaded: ", e, " upload_id: ", upload_id
This does not raise any error and print the size and upload_id but nothing appears on my dropbox.
What is happening? Any idea on how to do this?
upload_chunk()but seems to be missingcommit_chunked_upload(). Looking at theChunkedUploadersource code might help (e.g. sourcegraph.com/github.com/sourcegraph/dropbox/symbols/python/… ) - Armin Rigoclient.upload_chunk()my problem beeing how do you precise the filename?? Because this line does what I wantself.client.upload_chunk(StringIO(self.last_block), next_chunk_size, self.offset, self.upload_id)but still how do precise which file you are updating? - Manny42finish()call. - Armin Rigo