Commit Graph

1805 Commits

Author SHA1 Message Date
Bobby Wibowo
8782a004d6
chore: uploadController.js 2022-07-29 10:17:17 +07:00
Bobby Wibowo
681a3ca32f
fix: ServeStatic content-length transfer-encoding
both headers cannot co-exist at the same time, so we pass the expected
content-length value into 2nd param of Response.stream(), so that the
internal can decide to add it only when required
2022-07-29 10:16:49 +07:00
Bobby Wibowo
8748dcefb0
feat: parse content-disposition on url uploads 2022-07-29 10:15:11 +07:00
Bobby Wibowo
dbb4547105
chore: keep comments of deprecated opts in config
as easy reminders for older users
2022-07-29 09:56:11 +07:00
Bobby Wibowo
fae28f9aa2
feat: deprecate uploads.cacheFileIdentifiers conf
maintaining it is an unnecessary complexity
it's a feature that doesn't scale too well anyways

also renamed "queryDbForFileCollisions" to
"queryDatabaseForIdentifierMatch"
and updated config description accordingly

this should also now properly free the internal onHold Set
2022-07-29 09:14:55 +07:00
Bobby Wibowo
03eff45e8c
refactor: uploadController.js
some logic improvements
2022-07-28 13:26:15 +07:00
Bobby
301cf3377d
fix: set upload name utf8 encoding via busboy conf
instead of converting from the default latin1 using Buffer

changing busboy config was not possible with express + multer,
so i did not notice it's instead possible with hyper-express
2022-07-28 10:19:28 +07:00
Bobby Wibowo
db2fd3e4fd
fix: LICENSE 2022-07-25 09:44:23 +07:00
Bobby Wibowo
e040d2218c
chore: README.md 2022-07-25 07:55:15 +07:00
renovate[bot]
0f81fd07b8
fix(deps): update dependency helmet to ~5.1.1 (#546)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-25 07:50:51 +07:00
renovate[bot]
3482d0a5b1
fix(deps): update dependency knex to ~2.2.0 (#544)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-25 07:50:37 +07:00
renovate[bot]
ce23275bb5
chore(deps): update dependency eslint to ~8.20.0 (#542)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-25 07:50:22 +07:00
renovate[bot]
603af0d001
fix(deps): update dependency better-sqlite3 to ~7.6.2 (#541)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-25 07:49:58 +07:00
renovate[bot]
63620be3bf
fix(deps): update dependency hyper-express to ~6.4.2 (#547)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-25 07:49:30 +07:00
Bobby Wibowo
b9a1604440
refactor: rename handler/middleware class files 2022-07-25 07:48:31 +07:00
BobbyWibowo
8f46925352 dist: rebuilt client assets and bumped v1 version string 2022-07-25 00:43:06 +00:00
Bobby Wibowo
129a146213
chore: trigger assets rebuild
it failed in commit ec4d54573a
because i pushed another commit too soon
2022-07-25 07:41:44 +07:00
Bobby Wibowo
235988f3d3
feat: persistent cache file & player pages on prod 2022-07-25 07:40:00 +07:00
Bobby Wibowo
235a1c56e1
refactor: move devmode flag to utils 2022-07-25 07:39:35 +07:00
Bobby Wibowo
6239b0c1e4
refactor: lolisafe.js fs 2022-07-25 07:35:26 +07:00
Bobby Wibowo
cfb11f8ca0
feat: remove deprecated & unused filelength APIs 2022-07-25 07:34:17 +07:00
Bobby Wibowo
ec4d54573a
fix: errors thrown when url uploads get rejected 2022-07-25 07:32:39 +07:00
Bobby Wibowo
5bab3a495e
feat: allow to disable file hashing completely 2022-07-25 07:32:25 +07:00
Bobby Wibowo
6ba30a23c6
feat: improved chunked uploads lifecycle
added checks when there's an attempt to uploads chunks to same file in
parallel

improved final file size checks
2022-07-25 07:09:28 +07:00
Bobby Wibowo
ee8f1914ca
feat: req content-type for upload api 2022-07-25 06:13:12 +07:00
Bobby Wibowo
1b109e0dc0
feat: req content-type json -> application/json 2022-07-25 06:12:55 +07:00
Bobby
4ca64b141f
refactor: do not await assertRequestType
it's not an async function, lmao
2022-07-22 08:50:26 +07:00
Bobby
951737d7d0
feat: handle upload post api based on request type
it'd previously always try to parse as multipart first
now it'll immediately assume the upload post api is for url uploads if
the request type is json
2022-07-22 08:42:11 +07:00
Bobby
776ab8ab37
feat: assert request content-type in post apis 2022-07-22 08:40:40 +07:00
Bobby Wibowo
aa85d04d34
fix: url uploads failing 2022-07-22 04:20:37 +07:00
Bobby Wibowo
634347c219
chore: README.md, last time for the night I swear
my OCD..
2022-07-22 03:35:15 +07:00
Bobby Wibowo
cd39b4c1e5
chore: README.md 2022-07-22 03:33:13 +07:00
Bobby Wibowo
5b979c5139
chore: README.md 2022-07-22 03:26:27 +07:00
Bobby Wibowo
eb41aea5f2
feat: merge 'safe.fiery.me-feat/hyper-express' 2022-07-22 03:23:07 +07:00
BobbyWibowo
970d53c7dc dist: rebuilt client assets and bumped v1 version string 2022-07-21 20:18:56 +00:00
Bobby Wibowo
2a2d57a9e5
feat: list features in README.md 2022-07-22 03:10:32 +07:00
Bobby Wibowo
f76a7cf91c
chore: docker/README.md 2022-07-22 03:10:09 +07:00
Bobby Wibowo
96d276b396
fix: check if req.path_parameters is set 2022-07-22 02:03:59 +07:00
Bobby Wibowo
07d0237031
refactor: res.query -> .query_parameters
direct hyper-express prop get
2022-07-22 02:02:59 +07:00
Bobby Wibowo
25f87b3a49
chore: albumsController.js 2022-07-22 01:44:53 +07:00
Bobby Wibowo
7b9fca0bc3
refactor: req.params -> .path_parameters
direct hyper-express prop get
2022-07-22 01:44:15 +07:00
Bobby Wibowo
9a3c81b8bd
fix: api.js 2022-07-22 01:20:08 +07:00
Bobby Wibowo
fc1783fa12
chore: lolisafe.js 2022-07-22 01:12:41 +07:00
Bobby Wibowo
76a73b7e83
refactor: ServeStatic.middleware -> .handler
also moved it from middlewares to handlers directory

reasoning is that this class is better suited to handle routes directly
instead of being a global middleware
since IO stat to check if request path matches a physical file in the
disk every single time is not very performant
2022-07-22 01:12:35 +07:00
Bobby Wibowo
06178cc2c4
chore: lolisafe.js 2022-07-22 01:09:34 +07:00
Bobby Wibowo
30e9227a78
feat: custom pages use ServeLiveDirectory
they now have conditional GET suppor too
2022-07-22 01:09:17 +07:00
Bobby Wibowo
51e12e13c0
refactor: rateLimiter.js 2022-07-22 00:57:57 +07:00
Bobby Wibowo
d6020d81ae
feat: serveStatic with accept-ranges support
for streaming support

and with conditional GET support
2022-07-22 00:01:25 +07:00
Bobby Wibowo
33d0428e74
refactor: unset pattern in / middlewares
not having it set equals to having it be on / pattern to begin with
2022-07-21 23:59:46 +07:00
Bobby Wibowo
61461d2c26
feat(deps): added etag, fresh, and range-parser
aside from fresh, the other 2 are already dependencies of hyper-express,
so it barely increased production dependencies size

i suspect fresh will also be used by it anyways, since it's a pretty
generic library to handle conditional GET requests
2022-07-21 23:58:47 +07:00