node-youtube-resumable-upload icon indicating copy to clipboard operation
node-youtube-resumable-upload copied to clipboard

Spec issue, License and scope

Open benburkhart1 opened this issue 10 years ago • 3 comments

Hello,

first off I want to say thank you for creating this library. I am noticing a couple of things from an initial read.

  1. It looks like you're treating 500 errors the exact same as 400 errors, when they mean completely different things. 404 for instance should trigger a retry from scratch, 500 error should use exponential back-off and retry from where it left off. Your behavior does not match the specification.

  2. You have no LICENSE file and no mention of licensing except on NPM where you state it's ISC. Can you put that in the repo?

  3. Is there a reason you limit your library to YT's upload? The resumeable upload flow can be used with Google Drive and several other APIs, and you have 95% generic code, but the specific URL in there locks your library to one specific API limiting how useful it is to others, seems like this would be undesirable.

  4. Is there a reason you need people to specify a filepath? You're already using streams, many people who would use this library are using streams, seems like that'd be a desirable option to provide.

benburkhart1 avatar Dec 03 '14 21:12 benburkhart1

Additionally you require the googleapis but don't actually use it, same with the auth tool.

benburkhart1 avatar Dec 03 '14 22:12 benburkhart1

Hey, thanks for opening this. Just pushed a847de39b8c815e725109f0b1e11959b84d8dce8 and b5c3eae405258f4d0811f6643a335037d649e69f to get the dependencies and license resolved. google-auth-cli is used by test/test.js.

1: Feel free to commit :-), will fix soon.

3: Have never thought about doing this, I've kept it small mostly for maintainability's sake, but opening it up to other services would be a worthwhile expansion.

4: I will add the option for streams.

It's the end of the semester, so it may be a few weeks before I commit further changes.

grayleonard avatar Dec 04 '14 08:12 grayleonard

Small update - I've abstracted the network code so that changing between different services (YT, Drive, etc.) is easily doable.

I have a stream branch locally, but I'm not satisfied with it yet. Will post when/if I push it.

grayleonard avatar Nov 30 '15 19:11 grayleonard