Questions tagged [multer-s3]

Questions related to streaming multer storage engine for AWS S3.

210 questions
1
vote
1 answer

Node.js Multer upload to s3 and local storage

Need to upload my images into local storage and s3 My code: const fileStorage = multer.diskStorage({ destination: function(req, file, cb) { cb(null, "./public/uploads"); }, filename: function(req, file, cb) { …
Sesuraj P
  • 111
  • 1
  • 1
  • 6
1
vote
0 answers

How to upload multiple files to multiple storage with Multer s3?

I' ve seen many questions about to upload multiple files with Multer and by my side it is working, now my question is if is it possible to upload multiple files with Multer to different storages? Currently I am uploading the files to a bucket in S3,…
Victor Potes
  • 101
  • 1
  • 1
  • 8
1
vote
1 answer

convert nested json object to formdata javascript for Multer

Previously I was sending my Javascript object via post to the node backend. which was working alright. The problem is I have to move to form data because I'm changing avatar in our json to s3 url instead of base64. so I installed multer and…
Mani
  • 2,391
  • 5
  • 37
  • 81
1
vote
1 answer

Uploading files higher than few MBs directly to S3 using Multer-S3 using express

I'm trying to upload PDF files using Multer-S3 directly to S3 using express server. For some reason, it works when I try to upload SVG file it works great, but when I'm trying to upload something else like PDF there is no error, but when I try to…
Raz Levy
  • 138
  • 1
  • 9
1
vote
1 answer

Not getting the success response after video upload on s3 node.js

I am using the node.js as a backend and needs to upload the video on Amazon S3. For that I am using the multer module but I need to know the efficient and standard way for uploading the video. Generally we see that when we upload anything on the any…
Aks
  • 1,092
  • 3
  • 12
  • 29
1
vote
4 answers

Upload Large file (Video) to nodejs server and aws s3 using ReactJs

I am working build an OTT platform but facing issue on Uploading large file to server. I have tried doing it with multer to store the file in temp folder and use aws-sdk s3.upload. It works fine with small file size, But if I tries to Upload Large…
kvadityaaz
  • 1,441
  • 1
  • 16
  • 23
1
vote
0 answers

req.file is always undefined no matter what I do

I'm trying to upload a file to AWS S3 with multer using upload.single('image') but no matter what I do, req.file always returns undefined. I'm using postman to submit the form. I've tried the exact same code in a new project and it works. But when I…
IsaacT
  • 11
  • 1
1
vote
0 answers

Node.js How to upload multer fields to AWS s3

I want to upload image and video to s3 by using fields and save them to different path. However my code doesn't work and doesn't occur error. const video_info = uploadVideo.fields([ { name: 'video', maxCount: 1 }, { …
skull Kim
  • 597
  • 1
  • 4
  • 5
1
vote
1 answer

MulterS3 - Control flow to check req object

I'm trying to use Multer-S3, and it works like a charm to upload images. My challenge is that before running the Multer-S3 middleware, I want to have some kind of control flow, where it's possible to check if the req.body contains numbers for some…
Oscar Ekstrand
  • 581
  • 1
  • 4
  • 13
1
vote
0 answers

How to use memoryStorage and multer-S3 conditionally based on request in multer?

Based on request body multer should save file in memory or S3 using multer-s3. How to use both storage engines enabling them conditionally
1
vote
1 answer

"MulterError: Unexpected field\n at wrappedFileFilter using AWS, Multer S3, NodeJS, Mongo

I have spent days trying to figure out how to post photos to my AWS bucket and have read a lot of similar questions on SO but nothing seems to be working and I almost always get an "unexpected field" error. I have confirmed the libraries are the…
jasontulloch
  • 31
  • 1
  • 6
1
vote
0 answers

how to upload a file to digital ocean space using the AWS-SDK & MulterS3

I'm trying to upload files to my digital ocean space from a webpage. I made my own nodeJS server to upload the file. this is the index.js in my nodeJS server: const express = require('express'); const cors = require('cors'); const morgan =…
Sven Z
  • 183
  • 1
  • 10
1
vote
1 answer

nodejs, multer, aws S3

How do i apply uuid and date so that the filename stored in my database and the filename stored in my S3 bucket are the same? With this current implementation, the uuid and the date are always the same even if a post was made hours later. Can…
kd12345
  • 689
  • 10
  • 29
1
vote
1 answer

Image preview instead of download AWS S3

I made a Node.js lambda service that's only capable of uploading .jpeg, .jpg, and .png. Using multer and express Right now the filtering is working and everything else too. The problem I run into is that when the file is already uploaded, I cannot…
1
vote
0 answers

Read req.body whether multipart/form-data or application/x-www-form-urlencoded entype form?

I'm building a form backend like Formspree on NextJS, so I need to be able to receive all form POSTs at the same endpoint, without being able to control what the forms enctype is set as. I need to be able to read the req.body no matter the enctype,…
DasBeasto
  • 2,082
  • 5
  • 25
  • 65