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
1
vote
0 answers

How to attach busboy file stream to request body without using intermediate buffer?

I have a Fastify plugin that reads form data using busboy. Here is the relevant code: const bus = busboy({ headers: message.headers, limits: options }); bus.on("file", (fieldName: string, file: Readable, fileInfo: FileInfo) => { const chunks:…
Mr. X
  • 706
  • 12
  • 23
1
vote
1 answer

How do I change my Image uploading code to work under Firebase v9 from 8

The code is from a great tutorial "Full Stack React & Firebase Tutorial - Build a social media app". It allows the user to upload an image profile pic among other things... The issue I have is that it worked fine under Firebase 8 but since upgrading…
1
vote
1 answer

Azure Blob Storage .uploadStream() hangs on larger files

I'm currently working on the capability to upload larger files to Azure Blob Storage using Express.js and the @azure/storage-blob package. What I have works fine on files <5mb but anything larger will "fail" at some point on the upload stream. I say…
BenW301
  • 352
  • 2
  • 3
  • 18
1
vote
1 answer

Upload byte array from axios to Node server

Background Javascript library for Microsoft Office add-ins allows you to get raw content of the DOCX file through getFileAsync() api, which returns a slice of up to 4MB in one go. You keep calling the function using a sliding window approach till…
dotNET
  • 33,414
  • 24
  • 162
  • 251
1
vote
0 answers

NestJS upload file with progress

When use multer, you can't get the uploaded stream, you just get the buffer when the upload ends. so I think there is no way to use @UseInterceptors(FileInterceptor('file')) @Post() upload(@UploadedFile() file: Express.Multer.File, @GetUser() user)…
1
vote
1 answer

Why does Busboy yield inconsistent results when parsing FLAC files?

I have an Express server that receives FormData with an attached FLAC audio file. The code works as expected for several files of varying size (10 - 70MB), but some of them get stuck in the 'file' event and I cannot figure out why this happens. It…
Malaco
  • 25
  • 5
1
vote
1 answer

busboy-bodyparser changes my request so that GridFsStorage doesn't register the request-data in mongodb

I am a frontend developer trying to broaden my horizons, and making what will become a MERN application. I'm struggling with image uploads to mongodb. First I used the express bodyparser: app.use(express.urlencoded({ extended: true })); and…
1
vote
0 answers

Busboy Content-Type header is present but still getting an error saying missing Content-Type

I am using netlify functions to make an API. When the user submits multipart/form-data, I need to parse that data using busboy. But when I do this: const busboy = new Busboy({headers: event.headers}) I get an error saying missing content type. But…
1
vote
0 answers

receive by HTTP API a partial payload nodejs express service

We have designed a service in nodejs that permit to receive file via API. We use the concept of multipart data to receive the file. For the begining we start with the content-type text/plain. It works for most test case but we found an issue,…
ronki
  • 43
  • 4
1
vote
0 answers

React JS, file not uploaded with https to Node Server

I'm having the issue with file uploaded. It works perfectly on localhost but not with https after deploying website to firebase. My upload form in React looks like: const UploadInvoice = (props) => { const [selectedFiles, setSelectedFiles] =…
Wouter Dirks
  • 13
  • 1
  • 6
1
vote
1 answer

SyntaxError: Unexpected token - in JSON at position 0(Firebase,Busboy)

I am trying to upload an image to a user on firebase But I can't figure out why I get this error when I send a request to the server( SyntaxError: Unexpected token - in JSON at position 0) Also, this is a protected route(user needs to login/signup…
cucereanum
  • 43
  • 8
1
vote
1 answer

Parse files on firebase functions onRequest w/o Express

I need to get the files and the fields that come on a POST request from a multipart/form-data, firebase functions don't always have expressjs and it takes time to migrate the current functions; also I found using a middleware as Multer without…
Danny Fallas
  • 628
  • 1
  • 5
  • 11
1
vote
0 answers

SyntaxError: Unexpected token - in JSON at position 0

I am following online tutorial on youtube which is about building social network using react as front end and firebase functions as back end and I keep getting this error using the uploadImage route and I have no idea where the problem is, if…
1
vote
1 answer

Resizing or compressing image on upload to Firebase

The following google cloud function properly uploads an image, but I would also like to compress the image as to avoid unnecessary charges due to large files being uploaded. Any suggestions would be greatly appreciated!!! the code is as…
Rob Terrell
  • 2,398
  • 1
  • 14
  • 36
1
vote
1 answer

How do I enforce file upload size limits when using busboy?

Didn't want to store uploaded files on-disk or in-memory as an intermediate step, so decided to use busboy to handle file uploads to AWS S3. Here's my code: function handleUpload(req, res, bucket, key) { let bb = new Busboy({ headers:…
markvgti
  • 4,321
  • 7
  • 40
  • 62