Questions tagged [multer-s3]

Questions related to streaming multer storage engine for AWS S3.

175 questions
50
votes
5 answers

Simple file upload to S3 using aws-sdk and Node/Express

I am at a loss of what I am doing wrong, here is what I have: HTML
abritez
  • 2,486
  • 3
  • 26
  • 34
30
votes
7 answers

Uploading image to amazon s3 using multer-s3 nodejs

I am trying to upload an image to amazon s3 using multer-s3, but I am getting this error: TypeError: Expected opts.s3 to be object node_modules/multer-s3/index.js:69:20 This is my server code: var upload = multer({ storage: s3({ …
mBlaze
  • 301
  • 1
  • 3
  • 7
19
votes
3 answers

How to specify upload directory in multer-S3 for AWS-S3 bucket?

I am using express + multer-s3 to upload files to AWS S3 service. Using the following code, I was able to upload the files to S3 Bucket but directly in the bucket. I want them to be uploaded in a folder inside the bucket. I was not able to find the…
Aatman
  • 553
  • 5
  • 17
8
votes
2 answers

multer-s3-transform file upload is not working

I'm using multer-s3-transform to upload file to s3, but before upload I want to resize file, and save in two different size. Following is my code, no error occur, but file is not uploading. let multer = require("multer-s3-transform"); const aws =…
jones
  • 1,323
  • 1
  • 24
  • 62
7
votes
3 answers

Nodejs empty request body from form-data POST

I have a photo app (React Native) that is attempting to make a POST request to a nodejs express endpoint, with the photo and some metadata. The node app uploads the photo to s3. Using multer, the photo + s3 bits work swimmingly, but I just can't…
user2755635
  • 117
  • 1
  • 4
6
votes
3 answers

How to get direct URL to multipart file uploaded via Node.js

I wish to post file to multipart form and upload it to Amazon S3 Bucket and return to user link to the file. const express = require('express'), aws = require('aws-sdk'), bodyParser = require('body-parser'), multer = require('multer'), …
0x77dev
  • 154
  • 1
  • 10
6
votes
1 answer

How to resize an image and upload using multer in nodejs to s3 and using easy-image npm module?

I have done resizing of an image using easy image npm module in nodejs using the below code. var easyimg = require('easyimage'); easyimg.rescrop({ src:'1.jpg', dst:'/var/www/html/bangalore.jpg', width:100, height:100 …
Jagadeesh
  • 1,104
  • 4
  • 21
  • 37
6
votes
1 answer

How to access uploaded file from multer?

Im able to upload an image to S3. Now, if the file selected is .gif, I want to be able to convert the .gif file to .mp4 and upload the converted file to S3. I am able to convert a .gif to .mp4 with ffmpeg only if I give the path of the file. How do…
Somename
  • 2,836
  • 9
  • 34
  • 67
6
votes
3 answers

using multer -s3 amazon server image upload error access denied

AccessDenied: Access Denied at Request.extractError (/home/cricket_game/node_modules/multer-s3/node_modules/s3fs/node_modules/aws-sdk/lib/services/s3.js:524:35) at Request.callListeners…
Jay Jariwala
  • 165
  • 10
5
votes
3 answers

Upload to S3 using multer without a middleware function

I am using multer to upload media to my s3 bucket. I am using multer-s3 as a middleware to upload media like: const upload = multer({ storage: multerS3({ s3: s3, bucket: myBucket, key: function (req, file, cb) { cb(null, new…
Muhammad Zeeshan
  • 3,867
  • 2
  • 8
  • 31
5
votes
1 answer

Keep original file with multer-s3-transform

If I am uploading an image I want multer s3 to keep an original, in addition to create a thumbnail. In other words. I only want to change the filename in the first transform. The code below works ish, but the problem is that sharp() modifies the…
Jørgen Vik
  • 487
  • 4
  • 20
5
votes
1 answer

Multer-s3 Uploading empty files on mobile

I'm using angular and multer-s3 to upload files from an angular app to a node server. Everything works well on the desktop but for some reason when trying to upload the photo via my iPhone 7 the uploaded file is corrupt. I'm using the same image and…
Jonathan Corrin
  • 839
  • 3
  • 13
  • 37
4
votes
1 answer

Is it possible to get image dimensions (width and height) using Multer before the image gets saved/uploaded

I'm using Multer with Express and I'm trying to retrieve image dimensions (width and height) before I upload the image to AWS S3. My goal is to validate the image by image size, image type and image dimensions. Image size and image type can be…
hakaman
  • 181
  • 1
  • 6
4
votes
2 answers

Multer-S3 with sharp upload and resize

I've been able to upload to s3 an image file using multer-s3 library but now I'm trying to add the sharp library to resize and rotate but can't figure out where or how it needs to go. This is my current code that works for uploading: var options =…
Andres
  • 1,953
  • 6
  • 37
  • 67
4
votes
1 answer

multer-s3 upload within express is ridiculously slow

File uploads to S3 via multer-s3 in my express app is ridiculously slow (200kb takes 10 seconds, latency scales in relation to file size). Problem is multer-s3 but can someone tell how to further debug what's happening within the library? Passing…
1
2 3
11 12