Questions tagged [multer-s3]

Questions related to streaming multer storage engine for AWS S3.

210 questions
1
vote
1 answer

NodeJS - Validate extension before uploading multiple files with multer?

I have encountered with multer and uploading to S3: I am sending 5 images in the following way: app.post( '/upload', upload.fields( [ { name: 'image', maxCount: 1 }, { name: 'image2', maxCount: 1 }, { name:…
StackMaster
  • 359
  • 1
  • 5
  • 22
1
vote
1 answer

Uploading file to Digitalocean Spaces with Multer MulterS3 and AWS SDK, NodeJS

I'm trying to upload files to my Digitalocean Space using an express API. The log in the below upload method never gets called, and the success status is always returned. In the route req.files the file comes through, but no file is uploaded. I…
samsjb
  • 21
  • 1
  • 4
1
vote
0 answers

multiple files upload with express/multer - it is possible call some function for each file?

I have following for upload files into S3 const upload = extension => multer({ storage: multerS3({ s3, bucket, acl, metadata(req, file, cb) { cb(null, { fieldName: file.fieldname }); }, ... }), }); router.post( …
CodeBy
  • 714
  • 4
  • 10
  • 25
1
vote
1 answer

How do I integrate Multer and Multer-S3 with MongoDB?

I have decided to go the S3 route for storing images instead of doing it with Gridfs. But I am still confused as to how MongoDB will integrate with Multer and S3. For instance, lets say I have a collection of documents for each user. It's assumed…
MountainSlayer
  • 291
  • 1
  • 5
  • 14
1
vote
1 answer

Error: Unexpected field Amazon S3, Express, Multer, MulterS3

I am getting this error and I have no idea why its giving me that error, I have checked all the tutorials/similar questions related to this and nothing has worked. Can someone please help point me in the right direction. Thank you, Error: Unexpected…
Ray Lu
  • 51
  • 9
1
vote
1 answer

Access S3 credentials from ENV variable in heroku or AWS EC2

I deployed an app in Heroku and AWS EC2. I also created a AWS S3 for my storage for uploading images and videos. Suddenly Heroku has emailed me that my application was affected by a recent vulnerability and my Access key for AWS S3 was stolen…
1
vote
2 answers

How to get req.body parameters in multer s3

var upload = multer({ storage: multerS3({ s3: s3, bucket: 'bucket', metadata: function(req, file, cb) { cb(null, { fieldName: file.fieldname }); }, key: function(req, file, cb) { …
Bhavin
  • 179
  • 1
  • 2
  • 13
1
vote
0 answers

Multer S3 Ajax upload

I am having trouble adjusting my code to allow ajax uploads. I have the direct upload to S3 working but would like to use ajax to show upload progress. js $('#upload-input').on('change', function(){ var files = $(this).get(0).files; if…
Caldera500
  • 117
  • 1
  • 11
1
vote
1 answer

I'm totally faint in using multer-s3 to upload image to aws s3 bucket

what does "upload.array('photos', 3) " in the following code denotes .... My html code. (code reduced for brevity)
my…
V Abinaya
  • 85
  • 1
  • 8
1
vote
1 answer

Images not getting Stored in S3 bucket

I am using s3 multer module to directly upload a image file which is uploaded by user into my bucket. The app shows that update successful but i cannot see my files in bucket. The page after uploading the files respond with Upload successful. Below…
user3930213
  • 75
  • 1
  • 2
  • 15
1
vote
1 answer

ExpressJS - Form with File Upload Multipart Causing req.body Issue

I'm facing what I believe is a common problem with using enctype="multipart/form-data" form types with ExpressJS. Without middleware, req.body (or bodyParser) does not handle this form type and as a result I am sending null values for my fields on…
cphill
  • 5,596
  • 16
  • 89
  • 182
0
votes
0 answers

I want to make a post request on postman to upload a file but I get this error: ErrorCaptureStackTrace(err); TypeError [ERR_INVALID_ARG_TYPE]:

I work with nodejs on a social network project I am on the part of the image upload for the profile photo and to do this I installed the multer module more precisely, version 2.0.0-rc.1.So I set up a file upload.controller.js and n fihier routes.js…
0
votes
0 answers

Nestjs: how to create a post with description and s3 photo url

I trying to make a api with nestjs that needs to do these things: first, i need to post a file with multer and save in the AWS S3. After, with prisma, i need to create a post that needs a description (expected from the body of the request), and i…
0
votes
0 answers

Instead of image weird characters are being received on API

I have an endpoint as /images/upload and it's responsible for uploading photos to our s3 bucket, using multer and multer-s3. When I send the photo from postman everything works fine and the photo gets uploaded to s3 bucket, but when I try to upload…
0
votes
0 answers

Using Multer, how can I make uploading a file optional?

I have a post request for updating a product in stripe, but my issue is if I don't send a file in the request I get a 500 error and says UNEXPECTED END OF FORM AT MULTIPART. If I do upload a file, it works just fine. But i want it to be optional I…
JD258
  • 1
  • 1