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

zeanium-node

Package Overview
Dependencies
Maintainers
1
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zeanium-node - npm Package Compare versions

Comparing version 0.4.22 to 0.4.23

2

package.json
{
"name": "zeanium-node",
"version": "0.4.22",
"version": "0.4.23",
"description": "Zeanium for Node.js, simple http server and custome your business.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -179,31 +179,38 @@ /**

} else {
var _upload = this.__getUploadInfo(),
_incomingForm = new formidable.IncomingForm(),
_uploadDir = _upload.root + _upload.temp; //文件上传 临时文件存放路径;
var _ct = _request.headers['content-type']||'';
if(_ct.indexOf('text/xml')!=-1){
this._$get = (url.parse(_request.url, true).query||{});
callback(this._$get);
}else {
var _upload = this.__getUploadInfo(),
_incomingForm = new formidable.IncomingForm(),
_uploadDir = _upload.root + _upload.temp; //文件上传 临时文件存放路径;
if(!fs.existsSync(_upload.root)){
fs.mkdirSync(_upload.root);
}
if(!fs.existsSync(_upload.root)){
fs.mkdirSync(_upload.root);
}
if(!fs.existsSync(_uploadDir)){
fs.mkdirSync(_uploadDir);
if(!fs.existsSync(_uploadDir)){
fs.mkdirSync(_uploadDir);
}
//_incomingForm.keepExtensions = true; //使用文件的原扩展名
_incomingForm.uploadDir = _uploadDir;
_incomingForm.parse(_request,function(error, fields, files){
if(error){
console.log(error);
zn.error('Request.js: formidable.IncomingForm parse error, ' + error.toString());
} else {
_data = _request.data = {
fields: fields,
files: files,
uploadConfig: _upload
};
this._$post = fields;
this._$files = files;
this._$uploadConfig = _upload;
callback(_data);
}
}.bind(this));
}
//_incomingForm.keepExtensions = true; //使用文件的原扩展名
_incomingForm.uploadDir = _uploadDir;
_incomingForm.parse(_request,function(error, fields, files){
if(error){
zn.error('Request.js -- line 110 message: formidable.IncomingForm parse error. ' + error.toString());
} else {
_data = _request.data = {
fields: fields,
files: files,
uploadConfig: _upload
};
this._$post = fields;
this._$files = files;
this._$uploadConfig = _upload;
callback(_data);
}
}.bind(this));
}

@@ -210,0 +217,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