aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/jade/LICENSE
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2012-11-06 20:59:25 -0800
committerAdam Soltys <[email protected]>2012-11-06 22:56:57 -0800
commit5f907fcf5b98c5be780bb0edfe830b96d068e585 (patch)
tree6819e040a4bc8f41330103dd9cb54ba528c550d1 /node_modules/jade/LICENSE
parent08f341f692688f077e9080bded2b14fdd5979c1e (diff)
downloadcoinos-server-5f907fcf5b98c5be780bb0edfe830b96d068e585.tar.gz
coinos-server-5f907fcf5b98c5be780bb0edfe830b96d068e585.zip
Use node and express
Diffstat (limited to 'node_modules/jade/LICENSE')
-rw-r--r--node_modules/jade/LICENSE22
1 files changed, 22 insertions, 0 deletions
diff --git a/node_modules/jade/LICENSE b/node_modules/jade/LICENSE
new file mode 100644
index 00000000..8ad0e0d3
--- /dev/null
+++ b/node_modules/jade/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2009-2010 TJ Holowaychuk <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
"> auth } from "./passport.js"; import app from "../app.js"; import multer from "multer"; const storage = multer.diskStorage({ destination: (req, file, cb) => { cb(null, "uploads"); }, filename: async (req, file, cb) => { const parts = file.originalname.split("."); const ext = parts.length > 1 ? parts[parts.length - 1] : "bin"; cb(null, `${req.user.username}-${file.fieldname}.${ext}`); } }); export const upload = multer({ storage, onFileUploadStart: (file, req, res) => { console.log("CHECKING SIZE"); const maxSize = 32 * 1000 * 1000; if (req.files.file.length > maxSize) { return false; } } }); app.post("/profile", auth, upload.single("squirt"), async (req, res) => { let { filename } = req.file; res.send({ filename }); });