go-dropbox icon indicating copy to clipboard operation
go-dropbox copied to clipboard

Add upload session support

Open tj opened this issue 9 years ago • 3 comments

tj avatar Nov 28 '15 16:11 tj

Proposal 1

func (c *Files) ChunkedUpload(in *UploadInput) (out *UploadOutput, err error)

Proposal 2

We add an optional Length (or KnownLength) to UploadInput, then make ChunkedUpload() private and automatically perform a chunked upload when Length > 150MB (though this might be too magical).

Proposal 3

func (c *Files) UploadSession(in *UploadSessionInput) (session *UploadSession, err error)

Where these new types fully expose the semantics of https://www.dropbox.com/developers/documentation/http/documentation#files-upload_session-start (i.e. UploadSession.Append() and UploadSession.Finish()). This is probably the most suitable since I believe this library is aiming to be a 1:1 mapping.

@tj Thoughts?

Also, if anyone decides to implement this, please post here and mention you're working on it. Hopefully I'll find time though can't say when...

(My current use-case is an Afero Dropbox interface)

jpillora avatar Jan 10 '16 05:01 jpillora

Edit, fixed formatting

jpillora avatar Jan 10 '16 05:01 jpillora

In this package I'd definitely like to just mirror their end-points 1:1, go-dropy can provide something more useful on top. I haven't started any work on it though I actually just needed download functionality for now :D

tj avatar Jan 10 '16 19:01 tj