anacronw / multer-s3

multer storage engine for amazon s3
MIT License
660 stars 190 forks source link

client side encryption for upload ? #46

Closed clakech closed 3 years ago

clakech commented 8 years ago

Hi,

Thanks for your code. Very inspiring for my project.

I would like to send quite big files to S3, so I am using upload with multipart but as you know aws s3 js sdk does not manage client side encryption :cry:

The use cas is a browser upload a file to my server unencrypted, and while I received streams of this upload, I send these streams to s3 with s3.upload (sample here: https://devcenter.heroku.com/articles/s3-upload-node) That way, I don't have to wait for the whole download to finish before uploading to S3. That way, I can use client side encryption to my own server.

Do you think your approach/code could work for this use case (multipart upload) ? For instance, If I overide the s3.upload method to add client side encryption params.

I am worrying that s3 will not be able to recompose the file with all the differents parts if they have been encrypted on their own side.

I know it is not completely clear. But If someone understand my need, your helpful advices are welcome :wink:

LinusU commented 8 years ago

This could probably be solved in multer with this PR?

https://github.com/expressjs/multer/pull/356

LinusU commented 3 years ago

Closing due to inactivity...