Commit Graph

31 Commits

Author SHA1 Message Date
Bobby
3fcb0732a4
feat: filter temporary uploads from stats menu 2022-10-06 05:05:50 +07:00
Bobby
686875099f
feat: sort mime types by count in statistics menu 2022-10-06 04:41:28 +07:00
Bobby
7f1e736305
feat: filter uploads by type-is from stats menu 2022-10-06 04:16:31 +07:00
Bobby
c35fd3057c
feat: filter uploads by mime types from stats menu 2022-10-06 03:57:47 +07:00
Bobby
0c0b2aa3d1
feat: StatsManager 2022-10-06 02:46:49 +07:00
Bobby
ec0e51a7b8
feat: Constants 2022-10-06 02:44:31 +07:00
Bobby
cd2baba0d6
feat: ScannerManager 2022-10-06 02:42:36 +07:00
Bobby
95e5956313
feat: ConfigManager 2022-10-06 02:39:51 +07:00
Bobby
414afc7ae6
feat: allow specifying root path in serve classes
when used on non-root paths
2022-08-23 15:12:25 +07:00
Bobby Wibowo
0a62002a6e
fix: re-create "root" user if users table is empty
previously it'd always re-create it if "root" user itself is missing
from users table

this facilitates not having "root" user altogether
2022-08-09 17:28:21 +07:00
Bobby Wibowo
21ec4a7479
fix: 416 status code handling 2022-07-31 16:46:35 +07:00
Bobby Wibowo
0598a63989
refactor: serve handlers/middlewares
moved shared codes into serveUtils to reduce complexity
2022-07-31 16:34:06 +07:00
Bobby Wibowo
b9badcc944
fix: ServeStatic ensure forward slashes path 2022-07-31 14:06:17 +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
e7a15ecc47
feat: custom livedirectory middleware
with conditional gets support
2022-07-21 21:13:46 +07:00
Bobby Wibowo
7f9d05da26
feat: multer -> hyper-express multipartfield
get outta here multer, lmao
2022-07-12 13:07:13 +07:00
Bobby
b9d0f787d7
feat: improved SimpleDataStore.hold() again
this time uses an internal Set()

this should hopefully be the final iteration of this helper class until
a new "strategy" needs to be added
2022-07-06 17:49:13 +07:00
Bobby
17c863f724
feat: SimpleDataStore.hold() no longer use up size
this means internal Map-store may actually contain more keys than limit,
but only if the extraenous keys are held-keys (i.e. has null value)

this expects that you don't manually set keys with null values into the
store however
2022-07-06 17:14:00 +07:00
Bobby
ecb30cd159
feat: SimpleDataStore allow pre-holding key 2022-07-06 16:37:54 +07:00
Bobby Wibowo
d31181b4be
refactor: SimpleDataStore.STRATEGIES 2022-07-03 11:08:00 +07:00
Bobby Wibowo
39aaa25f3f
perf: SimpleDataStore 2022-07-03 11:00:48 +07:00
Bobby Wibowo
8a1ff434d9
feat: in-memory caching of content-disposition
please read config.sample.js
ignore if not serving files with node or not having the option turned on
2022-07-03 10:35:36 +07:00
Bobby Wibowo
409d0c4ffd
refactor: relocate db scripts 2022-06-22 13:53:01 +07:00
Bobby
b35f4ae6eb
fix: remove token from local storage if invalid
this required expanding our custom error classes with support for
arbitrary internal api error codes

however it'll only be used for invalid token errors for now (10001)

no plan to assign codes to other existing api errors
at that point it's probably better to redo the whole api infrastructure
2022-05-06 21:58:23 +07:00
Bobby
86c26cb50c
feat: some bypass support to passthrough scanning
only usergroup and file extension bypass

real file size can't be determined before passthrough scan,
so there's no bypass by max file size
please read the comments in sample config file

refactored utils.clamscan into utils.scan
2022-04-23 04:44:01 +07:00
Bobby
b5aa8d0758
fix: passthrough scan 2022-04-16 13:33:11 +07:00
Bobby
dd6f225461
fix: missing default vars in multerStorage 2022-04-15 20:31:12 +07:00
Bobby
db254c602b
feat: experimental clamscan passthrough support
when enabled, passthrough scanning will be used for non-chunked uploads

upload processing will be significantly faster if scanning is required
2022-04-15 16:41:05 +07:00
Bobby Wibowo
e2143b4d80
refactor: UserError -> ClientError, ServerError
ClientError will default to 400 HTTP error code.
ServerError will default to 500 HTTP error code.

Following the previous commit, these for now are only being used in
albumsController. More will soon follow.

Additionally fixed existing album names can sometimes be re-used when
editing an album.
2021-01-08 08:44:28 +07:00
Bobby Wibowo
ae31033c0c
refactor: init UserError, a custom Error object
This will be used for errors that are to be delivered to users, AND not
to be logged into the server (as in it stacktraces and all).
This will eventually remove the need to throw string literals.

In this commit, this has only been implemented on albumsController.js,
but more will soon to come.
2021-01-08 07:29:14 +07:00
Bobby Wibowo
0dfdccb25e
refactor: move custom multer storage
controllers dir: multerStorageController.js to utils/multerStorage.js
2021-01-08 07:25:27 +07:00