mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-18 17:21:33 +00:00
revert: last 2 commits
this reverts commit0e4f483506
andaca4a02f53
lel, im going crazy with this
This commit is contained in:
parent
0e4f483506
commit
4bb0af4ca7
@ -45,7 +45,7 @@
|
|||||||
"fluent-ffmpeg": "~2.1.2",
|
"fluent-ffmpeg": "~2.1.2",
|
||||||
"fresh": "~0.5.2",
|
"fresh": "~0.5.2",
|
||||||
"helmet": "~5.1.1",
|
"helmet": "~5.1.1",
|
||||||
"hyper-express": "6.4.5",
|
"hyper-express": "6.4.2",
|
||||||
"jszip": "~3.10.1",
|
"jszip": "~3.10.1",
|
||||||
"knex": "~2.2.0",
|
"knex": "~2.2.0",
|
||||||
"live-directory": "~2.3.2",
|
"live-directory": "~2.3.2",
|
||||||
|
@ -43,14 +43,11 @@ routes.post('/users/edit', [auth.requireUser, utils.assertJSON], auth.editUser)
|
|||||||
|
|
||||||
/** ./controllers/uploadController.js */
|
/** ./controllers/uploadController.js */
|
||||||
|
|
||||||
const uploadRouteOptions = {
|
// HyperExpress defaults to 250kb
|
||||||
// HyperExpress defaults to 250kb
|
// https://github.com/kartikk221/hyper-express/blob/6.4.4/docs/Server.md#server-constructor-options
|
||||||
// https://github.com/kartikk221/hyper-express/blob/6.4.5/docs/Server.md#server-constructor-options
|
const maxBodyLength = parseInt(config.uploads.maxSize) * 1e6
|
||||||
max_body_length: parseInt(config.uploads.maxSize) * 1e6,
|
routes.post('/upload', { max_body_length: maxBodyLength }, auth.optionalUser, upload.upload)
|
||||||
middlewares: [auth.optionalUser]
|
routes.post('/upload/:albumid', { max_body_length: maxBodyLength }, auth.optionalUser, upload.upload)
|
||||||
}
|
|
||||||
routes.post('/upload', uploadRouteOptions, upload.upload)
|
|
||||||
routes.post('/upload/:albumid', uploadRouteOptions, upload.upload)
|
|
||||||
routes.post('/upload/finishchunks', [auth.optionalUser, utils.assertJSON], upload.finishChunks)
|
routes.post('/upload/finishchunks', [auth.optionalUser, utils.assertJSON], upload.finishChunks)
|
||||||
|
|
||||||
routes.get('/uploads', auth.requireUser, upload.list)
|
routes.get('/uploads', auth.requireUser, upload.list)
|
||||||
|
@ -12,11 +12,10 @@ routes.get('/nojs', async (req, res) => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
routes.post('/nojs', {
|
// HyperExpress defaults to 250kb
|
||||||
// HyperExpress defaults to 250kb
|
// https://github.com/kartikk221/hyper-express/blob/6.4.4/docs/Server.md#server-constructor-options
|
||||||
// https://github.com/kartikk221/hyper-express/blob/6.4.4/docs/Server.md#server-constructor-options
|
const maxBodyLength = parseInt(config.uploads.maxSize) * 1e6
|
||||||
max_body_length: parseInt(config.uploads.maxSize) * 1e6
|
routes.post('/nojs', { max_body_length: maxBodyLength }, async (req, res) => {
|
||||||
}, async (req, res) => {
|
|
||||||
res._json = res.json
|
res._json = res.json
|
||||||
res.json = (...args) => {
|
res.json = (...args) => {
|
||||||
const result = args[0]
|
const result = args[0]
|
||||||
|
@ -2972,10 +2972,10 @@ https-proxy-agent@^5.0.0:
|
|||||||
agent-base "6"
|
agent-base "6"
|
||||||
debug "4"
|
debug "4"
|
||||||
|
|
||||||
hyper-express@6.4.5:
|
hyper-express@6.4.2:
|
||||||
version "6.4.5"
|
version "6.4.2"
|
||||||
resolved "https://registry.yarnpkg.com/hyper-express/-/hyper-express-6.4.5.tgz#14b9141cb15fc8c349774ecd335b710dd21b783a"
|
resolved "https://registry.yarnpkg.com/hyper-express/-/hyper-express-6.4.2.tgz#f3828cda1bf64c67287907d29bd6ea7270f2e4eb"
|
||||||
integrity sha512-50Dl0mftcxgxg9KM/f1jIXAE3yaX92XtNzP4NWqEXPqPTrED9KbY1oeVPSU6rGIJFjyhsJ0ZOYfhP+NpWUUPcQ==
|
integrity sha512-R4cvUrdDYpulzer6GShRVZQs6V69HRwkV28Y+e3YnSMh2nYf0ipvCmCbOOKbcecUs64cNbY49hujht/njYAgLw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/busboy" "^0.3.1"
|
"@types/busboy" "^0.3.1"
|
||||||
"@types/express" "^4.17.13"
|
"@types/express" "^4.17.13"
|
||||||
|
Loading…
Reference in New Issue
Block a user