Questions tagged [express-fileupload]

38 questions
1
vote
0 answers

How can I get the video duration in Node Js using video buffer data?

Hope everyone doing well. I have a nodejs project, in which I am allowing the end user to upload images/videos. And in nodejs (express) I am receiving the media file using express-fileupload package, which basically attaches files property in…
Shivam Verma
  • 905
  • 1
  • 8
  • 20
1
vote
2 answers

React onClick with axios is refresh after sent

in onClick, I call the function and use preventDefault() but the web page is refreshed. I'm not sure if it about's axios because when it done to fetching the web page is refreshes immediately. function submit(event){ event.preventDefault(); …
1
vote
2 answers

Multiple file uploads in nodejs using express-fileupload?

Currently I am able to post this to mongodb. It works fine. PROBLEM Instead of one attachment, I should be able to post many attachments independent of each other, there will be N different buttons available for the N uploads. const form = (req,…
0
votes
0 answers

Image file size changes in express-fileupload

In a project I'm working on this I found this issue. For example the uploading size of an image is 192kb But after it uploads it's like 582kb. I'm using React Native and Express JS. Using express-fileupload library to handle upload files in…
Mishen Thakshana
  • 1,050
  • 1
  • 14
  • 38
0
votes
0 answers

How to upload formData file with express-upload in node js server

I'm attempting to upload a local file to a node js express server. My local client upload looks like this: const file = await fs.readFileSync(`${desktopDir}/ai2html-output/home-pro-Artboard_1.jpg`); const title = "Test"; const form = new…
FabricioG
  • 3,107
  • 6
  • 35
  • 74
0
votes
0 answers

How do I build a resumable file uploader web app using react, express, node and express-fileupload package?

here is my server.js code: const express = require('express'); const cors = require('cors'); const fileUpload = require('express-fileupload'); const app = express(); const PORT = process.env.PORT ||…
0
votes
0 answers

Uploading an image into node.js server and using sql and i get this error: TypeError: Cannot convert object to primitive value

I've been trying to use console.log's with ther errors and can't figure it out. I have a form to create an account and upload an image in the process. To send the data to sql i have an if(!req.files){}, and to upload the image I have an…
0
votes
1 answer

save mp4 file in nodejs is saved with some error

I am creating a video/mp4 from a canvas in the front with react: const canvasResult = document.getElementById( "canvasResult" ) as HTMLCanvasElement; const createVideo = () => { // create video: const chunks: any[] = []; //…
andres martinez
  • 994
  • 2
  • 10
  • 21
0
votes
0 answers

Express-fileupload can't upload file after deploying my nodejs app on vercel

I have these code running on localhost, and everything is working perfect but later I uploaded it on GitHub and deployed on vercel, the code is working fine but the express-fileupload package is throwing an error saying can't locate tmp file/folder…
TRI NI TY
  • 1
  • 1
0
votes
0 answers

Repeating readstreams successfully

I am using csv-parser to parse a csv I have gotten from a POST request. The problem is, that after I restart the nodeserver, It only manages to parse the first csv from the first submission of the POST form, not any of the next ones. I am moving the…
0
votes
1 answer

req.files is undefined using express-fileupload with middleware also

I used express-file upload for this purpose. Using nodejs send file to server from client. req.files is always undefined , can you one help me on this. I have register express-fileupload middleware before refering req.files: in Server.ts import…
Shankar Kamble
  • 2,983
  • 6
  • 24
  • 40
0
votes
0 answers

Attach more file on request with express-fileupload

We are using express-fileupload to uploading file on express project. Currently with some special case we want to add more file into request with some url. We create a new middleware to attach new file into request.files but not success.
0
votes
1 answer

react app does not show images from express api

I'm using a node/express API to store users/clients, in one of the functionalities I need to upload an image to set the Brand logo, the image uploads well, and the image URL response is correct, if I put the image URL in browser load and shows…
Josh Rodríguez
  • 81
  • 1
  • 13
0
votes
1 answer

Error in updating profile with image using mongoose and cloudinary

updateProfile: async function(req, res) { try { const update = req.body; const id = req.params.id; if (!req.files || Object.keys(req.files).length === 0) { return res.status(400).send('No files were…
0
votes
1 answer

How to upload file from frontend to backend

I am developing a full stack web-app as part of my thesis. One of the things I am supposed to implement is the ability to send csv files from the front end to the back end. I chose to work with Express and React and I am implementing them on…