rest-easy-loki
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -22,4 +22,4 @@ "use strict"; | ||
const tmpdir = path.join(uploadPath, context); | ||
const baseUrl = `/upload/${context}/`; | ||
fs.mkdir(tmpdir, err => { | ||
const baseUrl = `/${context}/`; | ||
fs.mkdir(tmpdir, { recursive: true }, err => { | ||
if (err && err.code !== 'EEXIST') { | ||
@@ -26,0 +26,0 @@ const errMsg = `Error creating directory ${tmpdir}! Error: ${err.code} - ${err.message}.`; |
{ | ||
"name": "rest-easy-loki", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "A REST interface for lokijs supporting CRUD operations and automatic creation of new collections.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -87,3 +87,3 @@ # REST-EASY-LOKI | ||
You can use the `upload` folder for uploading files to a (automatically created) CONTEXT folder, if enabled on start-up using the `-u` instruction. Test it via `curl -F "file=@filename.jpg" http://localhost:3030/upload/:CONTEXT`. Files will be served `http://localhost:3030/`. | ||
You can use the `upload` folder for uploading files to a (automatically created) CONTEXT folder, if enabled on start-up using the `-u` instruction. Test it via `curl -F "file=@filename.jpg" http://localhost:3030/upload/:CONTEXT`. Files will be served from `http://localhost:3030/:CONTEXT/ORG_FILENAME`. When uploading the same filename in the same context, the previous version will be overwritten. No index file is created, so the contents of the locally created folders are not visible externally. Also note that the CONTEXT supports sub-folders too. | ||
@@ -90,0 +90,0 @@ ### Socket.io support |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
177576
65
2