Questions tagged [busboy]

A streaming parser for HTML form data for Node.js

busboy is a module for parsing incoming HTML form data.

268 questions
6
votes
1 answer

Possible to emit error with busboy?

Is it possible to emit an error with busboy and handle it? example: busboy.on('file', function(fieldname, file, filename, encoding, mimetype) { if(mimetype !== 'application/pdf') { this.emit('error',new Error('Wrong file type')); …
Spark323
  • 1,525
  • 2
  • 16
  • 27
6
votes
3 answers

LIMIT_UNEXPECTED_FILE issue when using Dropzone uploading multiple files with node multer

Using Dropzone in the frontend to upload multiple files to the server in one request and using the Multer middleware to handle multipart/form-data. Set uploadMultiple: true in the Dropzone config, it will append [] to the name. For example, the name…
Yujun Wu
  • 2,992
  • 11
  • 40
  • 56
5
votes
1 answer

unexpected end of multipart data

I have a .net core 2.0 API service that gets two files (XML and word) and transfers them to a node js server that saves them to a MongoDB. when I'm hosting the net core service on my localhost everything works fine but when I am uploading the .net…
ronara
  • 336
  • 11
  • 26
5
votes
2 answers

Serverless framework - uploading binary files to S3 become corrupted

I have an endpoint that takes in form data including a file. This file can be a text file, image, or pdf. I'm using busboy (v0.2.14) to parse the form data. That code looks like this: let buffers = []; file.on('data', data =>…
Eric Barbour
  • 205
  • 2
  • 9
5
votes
2 answers

Mutipart/form-data to JSON in Node.js using Busboy

I am working on an ios app which sends images and text to my firebase server using mutipart/form-data URLRequest. In order to process the data in my cloud function, I am using the method mentioned in documentation to parse the mutipart/form-data…
5
votes
4 answers

node.js limit number of requests from a user

I'm building an app in node.js that allows users to upload documents using express and busboy. The user can upload multiple documents in one upload but is limited to a total file size of 20mb. Is it possible to prevent a user from making multiple…
Spark323
  • 1,525
  • 2
  • 16
  • 27
5
votes
1 answer

busboy - is there a way to send the response when all files have been uploaded?

I'm trying to upload files to a server using node.js as backend and angular.js as frontend. I'm using express 4 + busboy for this. I have a table in the frontend where I should display all the files I'm uploading. So if I have 3 files and click on…
nelson687
  • 4,353
  • 3
  • 17
  • 20
5
votes
2 answers

busboy not firing field, file event

In below code, only finish event called. var Busboy = require('connect-busboy'); app.use(Busboy()); app.post('/fileupload', function(req, res) { var fstream; req.pipe(req.busboy); req.busboy.on('error', function(err){ …
Prayag C. Patel
  • 133
  • 1
  • 7
4
votes
0 answers

req.pipe - TypeError: reqPipe is not a function

I'm trying to upload some files with AWS using the busboy module, but when I use req.pipe to say that busboy is controlling the response, I get the error: req.pipe is not a function. Here is my code: const uploadDeArquivos = async (reqHeaders,…
4
votes
1 answer

fs.createWriteStream stalls

I am using the npm package busboy to parse a multipart form request and a write stream to write the sent file to disc. This works fine with small files, but when I try with a larger file (7MB) it seems that only about 5MB is written to disc and then…
pizzarob
  • 11,711
  • 6
  • 48
  • 69
4
votes
1 answer

Busboy file event not firing

So, I have this post request which used to work fine but once I upgraded to Node 10 I can't seem to figure out why the file event completely stopped firing... router.post('/uploadImage', authenticate.FBAuth, (req, res) => { const busboy = new…
4
votes
1 answer

Multiple file upload to S3 with Node.js & Busboy

I'm trying to implement an API endpoint that allows for multiple file uploads. I don't want to write any file to disk, but to buffer them and pipe to S3. Here's my code for uploading a single file. Once I attempt to post multiple files to the the…
josiahwiebe
  • 151
  • 1
  • 9
4
votes
1 answer

Firebase Cloud Functions and Busboy not parsing fields or files

I've been doing some experiments with Firebase Cloud Functions and Express, and I am stuck with a problem when I try to process a FormData with Busboy. It seems that I only get one big malformed text field with all the data in it, including also…
Bruno
  • 148
  • 8
4
votes
1 answer

Missing data when using busboy library to upload file inside of a Lambda?

I am trying to use busboy inside a lambda function to process a post request which is supposed to upload an image file. I notice that the whole file content is not making it to be parsed by busboy. I tried changing the call to busboy.write to just…
Max Crane
  • 137
  • 1
  • 3
  • 7
4
votes
1 answer

Express Busboy on File Event not firing

I am trying to make busboy work with my express code, but none of its events are firing, there are no silly mistakes like non-matching input field names etc. Here is app.js var express = require('express'); var path = require('path'); var favicon =…
Himanshu97
  • 541
  • 1
  • 9
  • 19
1
2
3
17 18