anacronw / multer-s3

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

Return a buffer of the file #31

Closed thebergamo closed 8 years ago

thebergamo commented 8 years ago

Well, I don't know if this is required for any other cases, but in my case sometimes is nice to have the buffer of the image uploaded.

What you think about it? @badunk @LinusU

Note: Not added any informations on README.md yet.

LinusU commented 8 years ago

Hmm, I'm actually -1 on this. The whole point with multer storage engines is that you won't need to buffer the entire files in memory. This change will negate that benefit.

I think that a better approach to this is to use the memory storage, and the upload the buffers to s3. What do you think?

thebergamo commented 8 years ago

I agree! In one of my endpoints are bad designed to attach the uploaded files in a email sended to mandrill and the mandrill api don't support links, but base64 files :(

Probably right now I will use this monkey patch for keep this endpoint alive, but in future of course I will remove that.