Questions related to streaming multer storage engine for AWS S3.
Questions tagged [multer-s3]
210 questions
0
votes
1 answer
Unique id (key) not changing for every post call to upload the image in aws s3 and so replaces the same image
I am creating an angular application where I initiate a POST call from the client-side. In server-side, I have the route set up with multer-sharp-s3 where I generate a new name (key) and upload it to aws s3 every time when there is a call.
Angular…

Sudharsan Prabu
- 105
- 1
- 11
0
votes
1 answer
Unexpected end of multipart data nodejs multer s3
iam trying to upload image in s3 this is my code
const upload = require('../services/file_upload');
const singleUpload = upload.single('image');
module.exports.uploadImage = (req,res) => {
singleUpload(req, res, function (err) {
if (err) {
…

Anns Rahim
- 388
- 3
- 14
0
votes
0 answers
Multer, Multer-s3 not calling callbacks for dynamic key naming
I'm trying to pipe a file that I send with FilePond for React, get with on my expressjs and upload to s3 with multer and multer-s3. I have seen tutorials that specify that the best way to name the files dynamically is to declare a callback on the…

Jacobo Koenig
- 11,728
- 9
- 40
- 75
0
votes
1 answer
save image to s3 bucket with image formate
I am trying to upload an image to a s3 bucket using multerS3. It does save the file to the s3 bucket but not in an image format.
here is my code.
storage: multerS3({
s3: S3,
bucket: 'slsupload',
acl: 'public-read',
metadata:…

Ian Stevens
- 56
- 4
0
votes
2 answers
multer-s3 rename files uploads same image multiple times
Help! No mater what I do I cant seem to give an image a custom file name using multer-s3. I have this really cool custom function that uploads images to s3. It works fine if I use the files original file name however when I try to use a custom file…

codernoob8
- 434
- 1
- 9
- 24
0
votes
2 answers
nodejs s3 bucket upload script reusable
Hey guys Im trying to upload a file to s3 I am successfully able to do it with the following code. However I would like to make it a little more reusable. I would like to be able to use a function like this.
singleFileUpload(fieldName, bucketName,…

codernoob8
- 434
- 1
- 9
- 24
0
votes
2 answers
Upload JSON file to aws s3 bucket from aws-sdk in node.js
I am receiving an array of objects from 3rd party API and I want to store its data to S3 bucket in JSON file. Below are the steps which I want to achieve
1> Create new JSON file in S3 bucket
I have following:
var AWS = require('aws-sdk')
var express…

Anand Vaidya
- 609
- 2
- 16
- 41
0
votes
2 answers
Access denied fetching images from amazon s3 with full permissions set
I have updated the bucket policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1536491056397",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource":…

kittu
- 6,662
- 21
- 91
- 185
0
votes
1 answer
SyntaxError: Unexpected token - in JSON at position 0,While uploading pdf files in postman
Controller.js
var multer = require('multer');
var upload = (req, res) => {
var storage = multer.diskStorage({
destination: function (req, file, cb) {
cb(null, './uploads/');
},
filename: function (req, file,…

uma
- 31
- 1
- 7
0
votes
2 answers
rename uploaded Images on Multer-s3
OVERVIEW:
I'm using S3 to let users upload images.
I'm working on an update route using a PUT method, which takes the url of a given image stored on a temp folder in S3 bucket and removes it to an images folder.
here is my upload object:
const…

ACEY
- 1
- 1
- 2
0
votes
3 answers
reactjs: Cannot pass file to node backend by react
I'm trying to send an image to backend through form field in React. I'm first assigning the state to empty like this in my constructor class
this.state = {
image: "",
}
I'm then making a handleChange function for both image and normal text…

Barry Bonds
- 118
- 2
- 11
0
votes
1 answer
Multer unexpected field error handling
The route with my multer middleware goes something like this.
router.post('my-route-path', multer.single('file'), controllerFunc)
The multer function I have defined is to allow a single file uploaded to the file system. Everything works fine, the…

Adeel Imran
- 13,166
- 8
- 62
- 77
0
votes
1 answer
I am not able to upload large files using multer-s3. It is not giving me any error as well.
I am not able to upload large files using multer-s3. It is not giving me any error as well. It just doesn't upload the file, doesn't even enters the callback and gets timeout. Any way to handle uploading large files to s3 Bucket?
I am using it like…

Gambhirsinh Zala
- 13
- 5
0
votes
1 answer
I'm try to upload file using node.js to aws but i don't know what went wrong with my code
app.js file:
var aws = require('aws-sdk'),
http = require('http'),
bodyParser = require('body-parser'),
fs = require('fs'),
path = require('path'),
methodOverride = require("method-override"),
express =…

Norman1007
- 11
- 2
0
votes
1 answer
how to set a custom dirname for multer-imager
Anyone know how to set a custom folder name for multer-imager dirname field ?
https://www.npmjs.com/package/multer-imager
const imager = require('multer-imager');
var S3ReziseStorage = imager({
bucket: process.env.AWS_BUCKET_NAME,
accessKeyId:…

me-me
- 5,139
- 13
- 50
- 91