Questions tagged [formidable]

A node.js module for parsing form data, especially file uploads.

This module was developed for Transloadit, a service focused on uploading and encoding images and videos. It has been battle-tested against hundreds of GB of file uploads from a large variety of clients and is considered production-ready.

Formidable reads submitted form data and processes it according to predefined rules.

Crafted specially for handling file uploads, it's perfect for writing uploaded files to disk, manipulating file names, etc..

Features

  1. Fast (~500mb/sec), non-buffering multipart parser
  2. Automatically writing file uploads to disk
  3. Low memory footprint
  4. Graceful error handling
  5. Very high test coverage

Module installation & Usage information

450 questions
20
votes
6 answers

How to rename files parsed by Formidable?

How does one go about naming files parsed by Formidable in Node? Currently my files are saving as '7c9d182a9892bb7588b49ea9d364efd0.pdf', I would much prefer the original file names. Anyone know how to do this?
Mark Nguyen
  • 7,168
  • 9
  • 31
  • 41
20
votes
4 answers

Stream uploading file to S3 on Node.js using formidable and (knox or aws-sdk)

I'm trying to stream upload a file submitted via a form directly to an Amazon S3 bucket, using aws-sdk or knox. Form handling is done with formidable. My question is: how do I properly use formidable with aws-sdk (or knox) using each of these…
jbmusso
  • 3,436
  • 1
  • 25
  • 36
17
votes
6 answers

Why is the Formidable `form.parse` callback not running in Express?

I am using the formidable package to handle file uploads on my server. This is my express.js app code: var formidable = require("formidable"), http = require("http"), util = require("util"); app.post("/admin/uploads", function (req, res) { …
R J.
  • 1,522
  • 10
  • 25
  • 40
16
votes
4 answers

next.js file upload via api routes / formidable - not working

I'm having a hell of a time getting file upload to work via api routes. On client-side im submitting the file like so: onFormSubmit = (e) => { e.preventDefault() // Stop form submit this.fileUpload(this.state.file).then((response) => { …
ndom91
  • 719
  • 1
  • 9
  • 19
14
votes
3 answers

Error handling with Node.js, Async and Formidable

In the following snippet I would like to validate the fields in the first async method. If they are not valid I would like to return an error to the user immediately. How do I do that? var form = new formidable.IncomingForm(); async1.series([ …
Robben_Ford_Fan_boy
  • 8,494
  • 11
  • 64
  • 85
13
votes
1 answer

os.tmpDir() is deprecated - node and formidable

I use node version 7.2.0 and formidable version 1.0.17 for file upload. After updating to the node version 7.2.0 I now get the following error when uploading files: (node:3376) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir()…
Fluffy
  • 217
  • 1
  • 2
  • 9
13
votes
3 answers

How can I make an html page automatically fit mobile device screens?

I am putting a Formidable Form on an html page by using an