New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-form-post

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-form-post - npm Package Compare versions

Comparing version 1.0.25 to 1.0.26

35

lib/dropbox.js

@@ -1,20 +0,27 @@

const concat = require("concat-stream");
const Stream = require("stream");
const path = require("path");
const db = require("dropbox-stream");
module.exports = function(uploadInfo, req, finished, handleError) {
let save_path = path.join(uploadInfo.directory, uploadInfo.filename);
save_path[0] != "/" ? save_path = "/" + save_path : ""; // dropbox requires absolute path
return concat((data) => {
uploadInfo.apiObject.filesUpload({
path: save_path,
contents: data
})
.then(function(response) {
req.files[uploadInfo.fieldname] = response;
finished();
})
.catch(function(error) {
handleError(new Error(error.error));
});
save_path[0] != "/" ? save_path = "/" + save_path : ""; // dropbox requires absolute path
const pass = new Stream.PassThrough();
let up = db.createDropboxUploadStream({
token: this.apiObject.accessToken,
filepath: save_path
})
.on("done", (response) => {
req.files[uploadInfo.fieldname] = response;
finished();
})
.on("progress", (response) => {})
.on("error", (err) => {
handleError(new Error(error.error));
});
pass.pipe(up);
return pass;
};

7

package.json
{
"name": "express-form-post",
"version": "1.0.25",
"version": "1.0.26",
"description": "Simple, reliable express http file and post body handler.",

@@ -34,3 +34,2 @@ "main": "index.js",

"busboy": "^0.2.14",
"concat-stream": "^1.6.0",
"hasha": "^3.0.0",

@@ -43,7 +42,9 @@ "mkdirp": "^0.5.1"

"dropbox": "^2.5.4",
"dropbox-stream": "^1.0.5",
"ejs": "^2.5.6",
"eslint": "^3.19.0",
"express": "^4.15.3",
"nodemon": "^1.11.0"
"nodemon": "^1.11.0",
"concat-stream": "^1.6.0"
}
}

@@ -114,3 +114,3 @@ # Express Form Post [![npm version](https://badge.fury.io/js/express-form-post.svg)](https://badge.fury.io/js/express-form-post) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

```sh
$ npm install dropbox --save
$ npm install dropbox-stream --save
```

@@ -117,0 +117,0 @@

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