jsantell / s3-stream-upload

A writable stream which uploads to Amazon S3 using the multipart file upload API.
MIT License
26 stars 7 forks source link

implicit dep on >=320KB sized aws-sdk for s3 #15

Open mvayngrib opened 7 years ago

mvayngrib commented 7 years ago

first of all, thanks for making this, it's awesome (!), and I want to use it

however, aws-sdk is an anchor, it bundles its own crypto, utils, etc. If you go to aws's js sdk builder here, and bundle just the s3 service, the minified bundle is 320K. Basically, hard to recommend browser-side.

there are light implementations of signing for aws services (e.g. this tiny one, or my wip fork, and the underlying multipart upload (s3.createMultipartUpload) is probably not too hard to extract.

i realize this is a big ask, but do you have any interest in making a lightweight s3-upload-client module that you can drop in instead of the s3 client. Or maybe you know of one?

jsantell commented 7 years ago

I'm not currently using this module, so I'm not sure what is out there currently that handles something like s3.createMultipartUpload, but this library at least does not pull in aws-sdk on its own, so as long as something mimics that API, it should work as a drop in