aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-09-02 07:16:59 -0700
committerAdam Soltys <[email protected]>2022-09-02 07:17:01 -0700
commit4ce441443b13e3cece375595f764f10e7ac0564a (patch)
treecf853807fafc13d7b15788f8e5781ce5fb7fbe93 /routes
parent3bb9af967d972617179d666060c4f50180199bf9 (diff)
downloadcoinos-server-4ce441443b13e3cece375595f764f10e7ac0564a.tar.gz
coinos-server-4ce441443b13e3cece375595f764f10e7ac0564a.zip
refactor upload endpoint
Diffstat (limited to 'routes')
-rw-r--r--routes/funding.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/routes/funding.js b/routes/funding.js
index 0cb6c858..d9cf3097 100644
--- a/routes/funding.js
+++ b/routes/funding.js
@@ -1,26 +1,4 @@
const mailgun = require("mailgun-js")(config.mailgun);
-const multer = require("multer");
-
-const storage = multer.diskStorage({
- destination: (req, file, cb) => {
- cb(null, "uploads");
- },
- filename: (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}`);
- }
-});
-
-const upload = multer({
- storage,
- onFileUploadStart: (file, req, res) => {
- const maxSize = 32 * 1000 * 1000;
- if (req.files.file.length > maxSize) {
- return false;
- }
- }
-});
app.post(
"/id",