roopakv / google-photos

Library to make hitting the Google Photos api easy
MIT License
56 stars 22 forks source link

Add method for changing Ky upload timeout #39

Closed skybldev closed 3 years ago

skybldev commented 3 years ago

Added a method for changing Ky's upload timeout to, for example, be fair to slower connections that might take longer than the timeout to upload the file.

I also did the same for uploadMultiple(), it only needs the last argument.

Started in #39.

Example of usage, setting Ky's upload timeout to 15000 for a single upload:

await photos.mediaItems.upload(
  albumID, type, ".tempfile", type, 15000);