Jesus / dropbox_api

Ruby client library for Dropbox API v2
MIT License
171 stars 113 forks source link

Reference implementation for chunked uploads? #18

Closed jhendley25 closed 6 years ago

jhendley25 commented 7 years ago

First off, thanks for all the hard work. This gem has helped me out a ton!

I'll be adding the upload_session_* functionality soon and was wondering if you have any ideas about the best way to handle bigger files. Do you have any examples?

Do you think determining whether the file needs to be uploaded normally or chunked seems like functionality this gem could handle automatically in the future?

Jesus commented 7 years ago

I'm very glad to have helped you :)

About your question, I haven't considered all the details on how to implement that yet.

However, I do think we should implement this at two levels:

  1. We should have the basic implementation of the endpoints without any cool feature. Just like all other endpoints in lib/dropbox_api/endpoints/files.
  2. Then we should consider what would be the most convenient public API to handle these endpoints and build this "ideal API" around the low level endpoints you've implemented before.

This would allow users to either use the low level calls or the wrapper with the "ideal API".

Keep in mind that what I've described is just my idea, you may have a different one and I'd like to hear it if you do.

vtm9 commented 7 years ago

@Jesus, what do you think about #34, may be it's not ideal, but enough for simple chunked uploud.

Jesus commented 6 years ago

So I think this is now sorted out with the new #upload_by_chunks method.

Thanks @vtm9 for your contribution on this.