go-dropbox
go-dropbox copied to clipboard
Add upload session support
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)
Edit, fixed formatting
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