Questions related to streaming multer storage engine for AWS S3.
Questions tagged [multer-s3]
210 questions
56
votes
6 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
40
votes
8 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
- 401
- 1
- 5
- 7
21
votes
4 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
- 573
- 1
- 5
- 17
17
votes
3 answers
NestJS - How to upload image to aws s3?
I'm trying to perform an image upload to aws s3 using multer-s3 on NestJS API. I have also tried aws-sdk. I use FileInterceptor and UploadedFile decorator to capture the file request. So far what I have is:
// Controller
@Post()
…

hnakao11
- 785
- 2
- 9
- 30
9
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
- 137
- 1
- 1
- 4
8
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
- 324
- 1
- 3
- 11
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,423
- 3
- 35
- 76
7
votes
4 answers
How to delete a file image on amazon s3 when
I have a program Model, and i the program has an image attribute which I use multers3 to upload when creating the Program.
The challenge that I am facing now is that, when I delete the program, everything gets deleted on my local machine but I…

Chukwuma Kingsley
- 497
- 8
- 20
7
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
- 4,608
- 4
- 15
- 41
7
votes
5 answers
Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27) Uploading the files to store i S3
When i am trying to upload the file and store in to s3 location, I got the error
Error: read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27)
is the above a version problem or bug?
var express =…

Ragu
- 81
- 1
- 1
- 2
7
votes
1 answer
How to use dynamic bucket name in Multer-s3 for file upload
I am trying to upload file into AWS S3 using node js.
My requirement is to use dynamic value for bucket in multerS3 storage object
storage: multerS3({
s3: s3,
bucket: function (req, file, cb) {
console.log(" bucketName…

ajoy sinha
- 1,156
- 4
- 14
- 30
7
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,967
- 8
- 24
- 47
7
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
- 3,376
- 16
- 42
- 84
6
votes
0 answers
Manipulate file before multer upload to S3
I want to download a pdf file using a form, then extract the first page and convert to jpeg (using PDFImage), then upload both the original pdf and the jpeg to my s3 bucket. The code for individual steps is fine but I cant work out how to do the…

dougfair
- 348
- 1
- 3
- 12
6
votes
4 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
- 185
- 2
- 10