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

openrosa-form-submission-middleware

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openrosa-form-submission-middleware - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

11

index.js

@@ -16,2 +16,3 @@ /*!

var typeis = require('type-is');
var debug = require('debug')('openrosa-form-submission');
var fs = require('fs');

@@ -50,4 +51,6 @@ var openrosaRequest = require('openrosa-request-middleware');

// ignore GET
if ('GET' === req.method || 'HEAD' === req.method) return next();
// Response to HEAD requests with status 204
if ('HEAD' === req.method) return res.sendStatus(204);
// Ignore all other request methods other than post
else if ('POST' !== req.method) return next();

@@ -75,3 +78,5 @@ // check Content-Type

req.body = data.toString();
fs.unlink(val.path, function() {});
fs.unlink(val.path, function(err) {
if (err) debug('Error deleting file %s', file.path);
});
processingXml = false;

@@ -78,0 +83,0 @@ if (done && !wasError) next();

{
"name": "openrosa-form-submission-middleware",
"version": "1.0.1",
"version": "1.0.2",
"description": "Express middleware for receiving OpenRosa xform submissions",

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

"dependencies": {
"debug": "^2.1.1",
"multiparty": "~4.0.0",

@@ -36,3 +37,3 @@ "on-finished": "~2.1.0",

"devDependencies": {
"connect": "3",
"express": "^4.0.0",
"mocha": "~1.21.3",

@@ -39,0 +40,0 @@ "should": "~4.0.4",

@@ -7,3 +7,3 @@ # OpenRosa FormSubmissionAPI middleware

It is [connect](https://github.com/senchalabs/connect/) middleware for [multiparty](https://github.com/andrewrk/node-multiparty/) to process OpenRosa form submissions from [ODK Collect](https://opendatakit.org/use/collect/) following the [OpenRosa FormSubmissionAPI spec](https://bitbucket.org/javarosa/javarosa/wiki/FormSubmissionAPI).
It is [express](http://expressjs.com/) middleware for [multiparty](https://github.com/andrewrk/node-multiparty/) to process OpenRosa form submissions from [ODK Collect](https://opendatakit.org/use/collect/) following the [OpenRosa FormSubmissionAPI spec](https://bitbucket.org/javarosa/javarosa/wiki/FormSubmissionAPI).

@@ -10,0 +10,0 @@ The xml form submission is returned as req.body and any attached files are returned as req.files.

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