Commit Graph

1722 Commits

Author SHA1 Message Date
Bobby Wibowo
40675e2a40
fix: dashboard select all checkbox logic 2022-07-31 16:03:02 +07:00
BobbyWibowo
4add610864 dist: rebuilt client assets and bumped v1 version string 2022-07-31 08:56:32 +00:00
Bobby Wibowo
527498bb1e
perf: list albums db query 2022-07-31 15:55:27 +07:00
Bobby Wibowo
285e79c5a7
feat: configurable uploads/albums/users per page
please check sample.config.js for new options

if missing from config, defaults to 25 per page (old defaults)
2022-07-31 15:51:32 +07:00
Bobby Wibowo
a6e1943655
chore: init dist static assets before public 2022-07-31 14:49:58 +07:00
Bobby Wibowo
2389974c7d
feat: ServeStaticQuick
chokidar is now a production dependency

please read the comments in ServeStaticQuick.js for a description of
what the class does

public and dist directories are now served with that class by default

before starting hyper-express on the listen port, await for all
ServeLiveDirectory and ServeStaticQuick instances
2022-07-31 14:31:25 +07:00
Bobby Wibowo
d40d1e396f
fix: ServeStatic with zero bytes files 2022-07-31 14:17:06 +07:00
Bobby Wibowo
bea63b07d8
fix: no-cache cache-control for static assets
when cacheControl is disabled in config

this behavior makes more sense, and will then properly rely on our
internal conditinal GETs handlers and whatnot
2022-07-31 14:10:44 +07:00
Bobby Wibowo
b1566c5abf
refactor: ServeLiveDirectory
ensure forward slashes path

refactored init method

ensure internal res.type is set before attempting to call external
setHeaders function, to allow overrides
2022-07-31 14:08:13 +07:00
Bobby Wibowo
b9badcc944
fix: ServeStatic ensure forward slashes path 2022-07-31 14:06:17 +07:00
Bobby
4591b8bb42
refactor: generateUniqueToken -> getUniqueToken
this now matches lifecycle with similar functions in upload and album
controllers

also added a new util function .mask() for basic string masking
2022-07-30 08:37:57 +07:00
Bobby
b7dcf30578
feat: console logs for identifiers on debug only 2022-07-30 08:35:26 +07:00
Bobby
548af312a7
chore: authController.js 2022-07-30 08:02:17 +07:00
Bobby
c23bc90412
refactor: album random identifier generation 2022-07-30 08:01:19 +07:00
Bobby
5fd6685e44
chore: lolisafe.js 2022-07-30 07:53:38 +07:00
renovate[bot]
fa9ca96d66
chore(deps): update dependency browserslist to ~4.21.3 (#548)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-30 05:05:48 +07:00
renovate[bot]
d1e61f0ec8
fix(deps): update dependency rate-limiter-flexible to ~2.3.8 (#549)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-30 05:05:37 +07:00
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