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
1 answer

typescript error - type string cant be used to index object

I'm still pretty noob to typescript. I'm trying to get busboy working on my server. I have this block of code that gives me the error. const bb = busboy({ headers: req.headers }); const uploads = {}; const tmpdir = os.tmpdir(); const fields…
HelpANoobOut
  • 213
  • 1
  • 5
  • 11
0
votes
1 answer

Busboy with Fastify gives Unsupported Media Type: multipart/form-data; boundary

I'm trying to upload a file with BusBoy in Fastify but I get this error Unsupported Media Type: multipart/form-data; boundary=--------------------------964469693542161018443025 reqId: "req-1" res: { "statusCode": 415 } err: { …
Bill
  • 4,614
  • 13
  • 77
  • 132
0
votes
0 answers

Set Firebase Cloud Functions Storage file permissions

I'm uploading an image from the Firebase Admin. I'm using Firebase Cloud Functions as backend and Busbuy node package to handle the form part. This is the code: getStorage().bucket().file(filePath).save(); It's working and now I can see the file is…
0
votes
1 answer

Bus Boy on file not firing

In Next Js, I have a upload image endpoint. const busboy = require('busboy') export default function handle(req, res) { const bb = busboy({headers: req.headers}); bb.on('file', (fieldname, file, filename, encoding, mimetype) => { …
Bykaugan
  • 99
  • 6
0
votes
1 answer

Why is ReadableStream preferable to Buffer when returning file data from a middleware?

I have a middleware that reads multipart/form-data and returns any files submitted attached to the request body. I use busboy to process the input and return the file contents as a buffer. I read that buffers can consume a lot of memory and hence…
Mr. X
  • 706
  • 12
  • 23
0
votes
1 answer

NodeJS cannot return data from busboy finish event

I am currently trying to develop a google cloud function to parse multipart files (excel format or csv) in order to populate the firestore database. I am using busboy in a helper function to parse the file, convert it to json and return it to the…
GrandJagon
  • 23
  • 3
0
votes
0 answers

Where is the .on method defined in busboy?

i was looking into the source code of multer in the make-middleware file and I came across the .on method attached to a new busboy object, so i jumped to busboy source code to see what the .on method do and i cannot find it defined in the main.js…
moekm
  • 17
  • 3
0
votes
1 answer

Nodejs busboy is not a constructor

I just containerised a nodejs based serverside app and getting this error below any assistance will be greatly appreciated. i had this same app running on ec2 instance without any issue at all 0|src | GET /.env 404 1.499 ms - 43 10|src |…
0
votes
1 answer

hashing a streaming file before uploading to S3

I am trying to stream a file to S3 without storing the file to disk/ssd. I would like to have part of the hash of the file as a part of the filename when uploading to S3. EDIT_v1: Been trying to follow this post using busboy as the parser: Calculate…
M.Holmes
  • 403
  • 1
  • 7
  • 22
0
votes
0 answers

Upload multiple files with busboy?

I can upload one file, but I can't seem to upload multiple, it gets stuck on the first file. Client async function uploadFiles() { let formData = new FormData(); formData.append("recordUid", recordUid); formData.append("fieldUid",…
Ivan
  • 1,967
  • 4
  • 34
  • 60
0
votes
1 answer

Forcing Client to Stop AJAX from Node.js Server

I looked at several SO posts trying to find a way to make a Node.js server tell a client to stop uploading after a certain file size has been reached. The most promising of these is ed-ta's technique at Avoiding further processing on busyboy file…
Shawn Eary
  • 684
  • 2
  • 7
  • 21
0
votes
1 answer

req.body is [Object : null prototype]{} while using multer

i want to upload an image in nodejs with multer but i have some issues in my server.js (main) i have const express = require('express'); const app = express(); const expressBusboy = require('express-busboy'); expressBusboy.extend(app,{upload :…
0
votes
1 answer

How to close Busboy connection and send back an error response in ExpressJS

I have busboy in my ExpressJS app for file streaming. Now at some point I wish to send back a regular response that the file size is too large. How can I do that? Here is my code to illustrate what I want: busboy.on('file', function(fieldname,…
ololo
  • 1,326
  • 2
  • 14
  • 47
0
votes
2 answers

Converting the Buffer to readable JSON format in Node.js

I have a buffer text Where I am getting from the SendGrid Inbound Parse webhook. The Inbound Parse Webhook processes all incoming emails for a domain or subdomain, parses the contents and attachments then POSTs multipart/form-data to a URL that you…
Lakshmi
  • 278
  • 5
  • 19
0
votes
3 answers

NodeJS + Nginx: busboy behind an nginx reverse proxy

If I spin up a nodejs server and use busboy then I am able to upload large files (10+ gbs) but when i use the same nodejs code and use nginx as a reverse proxy then nginx throws "413 request entity too large" Has anyone encountered such issue? How…
Phantom007
  • 2,079
  • 4
  • 25
  • 37