Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

formidable

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formidable - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

17

lib/incoming_form.js
if (global.GENTLY) require = GENTLY.hijack(require);
var fs = require('fs');
var util = require('./util'),

@@ -20,3 +21,3 @@ path = require('path'),

this.keepExtensions = false;
this.uploadDir = '/tmp';
this.uploadDir = IncomingForm.UPLOAD_DIR;
this.encoding = 'utf-8';

@@ -36,2 +37,16 @@ this.headers = null;

IncomingForm.UPLOAD_DIR = (function() {
var dirs = [process.env.TMP, '/tmp', process.cwd()];
for (var i = 0; i < dirs.length; i++) {
var dir = dirs[i];
var isDirectory = false;
try {
isDirectory = fs.statSync(dir).isDirectory();
} catch (e) {}
if (isDirectory) return dir;
}
})();
IncomingForm.prototype.parse = function(req, cb) {

@@ -38,0 +53,0 @@ this.pause = function() {

2

package.json
{
"name": "formidable",
"version": "1.0.3",
"version": "1.0.4",
"dependencies": {},

@@ -5,0 +5,0 @@ "devDependencies": {

@@ -145,5 +145,7 @@ # Formidable

#### incomingForm.uploadDir = '/tmp'
#### incomingForm.uploadDir = process.env.TMP || '/tmp' || process.cwd()
The directory for placing file uploads in. You can later on move them using `fs.rename()`.
The directory for placing file uploads in. You can later on move them using
`fs.rename()`. The default directoy is picked at module load time depending on
the first existing directory from those listed above.

@@ -150,0 +152,0 @@ #### incomingForm.keepExtensions = false

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc