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
0
votes
0 answers

FormData using BusBoy for firebase works in serve but not in deploy

Situation I have a firebase function that updates the user image. Problem When I run locally my function using firebase serve, I successfully upload the image to firestore using Postman. However, when I run firebase deploy and I try to upload the…
EPaz
  • 85
  • 1
  • 2
  • 13
0
votes
1 answer

Busboy file event not firing , received file as buffer in request body

I am developing a react application which uses react-dropzone hook to implement drag and drop file upload feature. I am then sending the file via a POST request to a firebase cloud function. I am using BusBoy to write the received file to a tmpdir…
Sriram J
  • 174
  • 1
  • 1
  • 9
0
votes
1 answer

How to delay pipe initialisation until value is discovered up stream?

So i'm using busboy as my middleware to stream form data with CSV files in it in my express server. These CSV files can have a varying number of extra config parameters so i need to parse the first line to work out how many parameters there are…
wizzfizz94
  • 1,288
  • 15
  • 20
0
votes
1 answer

Busboy + Express: How to get the sended file and its specifications

I struggle on a very simple example for Express.js and Busboy. The code is as simple as possible. That makes it easier for me and others to understand whats going on. the form block:
c0mmand0r
  • 33
  • 5
0
votes
1 answer

Busboy sending response back before reading file length and file data? i am uploading single file

module.exports.upload = function (req, res) { fileName = path.basename(req.query.fileName); var fileExtn = path.extname(req.query.fileName); console.log("fileName " + fileName); console.log("fileExtn " + fileExtn); var fileCheckResponse =…
0
votes
1 answer

Uploads multiples images with multiples files field

I'm having hard time for the last few day on how to upload multiples images on firebase with busboy. I want to use 3 fields with 3 different images. so I can store it in one folder. I also want the image to have the field name I found one topic that…
Bibi
  • 15
  • 7
0
votes
1 answer

Handling a field error using busboy (prevent submission of file if there is a field error)

I'm using busboy to upload a file in the manner described in the code below. If there's a validation error in the field stage I don't want to process the file (i.e. dont want to upload the file), not sure how I can do it... because both on file and…
Storms786
  • 416
  • 1
  • 7
  • 20
0
votes
2 answers

Jest mockImplementation does not exist on busboyConstructor

After all my researches, i could not find an answer to my problem. As i try to mock busboy in my project using jest, it keeps on saying that mockImplementation (and mockRestore) is not a function import * as Busboy from…
0
votes
1 answer

Uploading documents, pdf's to google cloud using firebase. Get error

I'm trying to upload simple documents using busboy / express.js to google cloud. I am getting this error. Error: Cannot find module 'busboy/lib/types/node_modules/dicer' and this is the code for the request. // Upload a document for…
LeCoda
  • 538
  • 7
  • 36
  • 79
0
votes
1 answer

How do I push a new array index into a database property, keeping the data already stored untouched?

I have some code that uploads an image as well as updates a image URL array property named 'images' where each image url is stored within indexes of the array. I have the function below where I tried to use…
0
votes
1 answer

How to extract FROM,TO,SUBJECT,BODY,ATTACHMENT fields from multipart/form-data coming through AWS API in string format (contain \n\r)

I have configured SendGrid Inbound Parse webhook to get email content on my AWS API endpoint. So I am getting email content in multipart/form-data format but in string which contains \n\r. AWS API event.body= --xYzZY\r\nContent-Disposition:…
0
votes
1 answer

Trouble saving FileStream to bucket using fireabse admin SDK and busboy

Using the help of busboy I am attempting to save FileStream into a Firebase bucket. code: const admin = require('firebase-admin'); const userFilesBucket = admin.storage().bucket(USER_FILES_BUCKET_NAME); function handlePost(req, res){ const…
KasparTr
  • 2,328
  • 5
  • 26
  • 55
0
votes
1 answer

How to validate Firebase AuthToken before handling the rest of the request

I have a NodeJS server that accepts form-data that includes a Firebase token a phone number and a file. I'm using busboy and express to get the data from the form. The code looks like this: function validateAuthToken(authToken) { if…
Itamar Kerbel
  • 2,508
  • 1
  • 22
  • 29
0
votes
1 answer

Error: Unexpected end of multipart data occured in post request in node.js

I am trying to recieve an image via busboy in Node.js post call however I am getting the following error: Error: Unexpected end of multipart data thrown by ..\node_modules\dicer\lib\Dicer.js:61:28 This is my code: busboy.on('file', (fieldname,…
Adhil
  • 1,678
  • 3
  • 20
  • 31
0
votes
0 answers

How to fix 'Part terminated early due to unexpected end of multipart data' error from busboy

I'm using busboy to stream jpg image to a node server. But the issue is everytime i try to upload a file from client with Postman, it fails with the following error: [info] > Busboy error catching......>>>>>>>>>>>>>> Error: Unexpected end of…
Ismail
  • 117
  • 2
  • 12