Commit graph

34 commits

Author SHA1 Message Date
Steven
de8db63811 chore: rename workspace setting service 2024-01-29 22:43:40 +08:00
Aleksandr Baryshnikov
fa17dce046
feat: pre-signed URL for S3 storage (#2855)
Adds automatically background refresh of all external links if they are belongs to the current blob (S3) storage. The feature is disabled by default in order to keep backward compatibility.

The background go-routine spawns once during startup and periodically signs and updates external links if that links belongs to current S3 storage.

The original idea was to sign external links on-demand, however, with current architecture it will require duplicated code in plenty of places. If do it, the changes will be quite invasive and in the end pointless: I believe, the architecture will be eventually updated to give more scalable way for pluggable storage. For example - Upload/Download interface without hard dependency on external link. There are stubs already, but I don't feel confident enough to change significant part of the application architecture.
2024-01-29 21:12:29 +08:00
Steven
b9cbe6626f chore: update tag rename 2024-01-27 05:26:32 +08:00
Steven
4d48f50815 chore: use resource name in frontend 2024-01-21 10:55:49 +08:00
Steven
582cc6609c feat: add user-defined id to resource 2024-01-21 10:49:30 +08:00
Elliot Chen
3181c076b2
feat: add {uuid} in path template when using local storage or S3 (#2696)
Add {uuid} in path template when using local storage or S3

Add an addition tag `{uuid}` to the `replacePathTemplate`.

It is a workaround to leak the public links of a resource when using S3-based object storage. Currently, all resource blobs stored in S3 (R2, OSS) are set to be public. It is insecure as the resources for the private memos are also accessible on the Internet. Using an additional {uuid} might reduce this risk.

Meanwhile, it is also possible to avoid filename conflict
2024-01-02 20:57:55 +08:00
Lincoln Nogueira
411e807dcc
chore: use consistent relative paths for resources (#2683)
- always store resources with a relative path with forward slashes, which will be transformed as needed when the file is accessed

- fix an issue with thumbnail generation on Windows

- add several validations for local storage setting

- improve front-end error feedback when changing local storage

- add migrations to make existing resource paths relative (not needed, but improves database consistency)
2023-12-29 07:49:55 +08:00
Steven
137e64b0dd chore: update metrics 2023-11-05 21:41:47 +08:00
Steven
ac81d856f6 chore: delete resource file sync 2023-10-28 10:42:39 +08:00
Steven
36b4ba33fa chore: remove outdated activity definition 2023-10-27 23:11:56 +08:00
Athurg Gooth
215981dfde
chore: remote context.Context pointer (#2448)
remote context.Context pointer
2023-10-26 20:21:44 +08:00
Steven
5b3af827e1 chore: move common packages to internal 2023-10-26 09:02:50 +08:00
Steven
31997936d6 chore: move resource public api 2023-10-08 19:40:30 +08:00
Steven
34ae9b0687 chore: update default storage back to database 2023-10-05 13:36:33 +08:00
Steven
7dc4bc5714 chore: update resource service 2023-10-03 23:44:14 +08:00
steven
a928c4f845 chore: update error format 2023-09-29 13:04:54 +08:00
Steven
6007f48b7d chore: retire memo resource relation table 2023-09-27 00:40:16 +08:00
Steven
cd0ea6558d chore: update golangci-lint config 2023-09-17 22:55:13 +08:00
Steven
4424c8a231 chore: add resource service definition 2023-09-16 00:11:07 +08:00
Steven
33d9c13b7e chore: remove openid field from user 2023-09-14 22:57:27 +08:00
Steven
42bd9b194b feat: impl user access token api 2023-09-14 20:16:17 +08:00
Steven
3df550927d chore: update user profile page 2023-09-10 10:33:22 +08:00
boojack
4af0d03e93
chore: add user profile page (#2175)
chore: some enhancements
2023-08-25 23:10:51 +08:00
Jianwei Zhang
c835231d32
feat: add header into resource response (#2120)
Update - add header for get resource
2023-08-10 23:45:30 +08:00
boojack
35f2d399e2
chore: update api v1 docs (#2117)
* chore: update apiv1 docs

* chore: update
2023-08-09 22:30:27 +08:00
Lincoln Nogueira
4491c75135
feat: add SwaggerUI and v1 API docs (#2115)
* - Refactor several API routes from anonymous functions to regular definitions. Required to add parseable documentation comments.

- Add API documentation comments using Swag Declarative Comments Format

- Add echo-swagger to serve Swagger-UI at /api/index.html

- Fix error response from extraneous parameter resourceId to relatedMemoId in DELETE("/memo/:memoId/relation/:relatedMemoId/type/:relationType")

- Add an auto-generated ./docs/api/v1.md for quick reference on repo (generated by swagger-markdown)

- Add auxiliary scripts to generate docs.go and swagger.yaml

* fix: golangci-lint errors

* fix: go fmt flag in swag scripts
2023-08-09 21:53:06 +08:00
boojack
7c5296cf35
chore: update id type to int32 (#2076) 2023-08-04 21:55:07 +08:00
boojack
5f819fc86f
chore: update auth middleware (#2057)
* chore: update auth middleware

* chore: update

* chore: update
2023-07-31 20:55:40 +08:00
boojack
cc3a47fc65
feat: impl auth interceptor (#2055)
* feat: impl auth interceptor

* chore: update

* chore: update

* chore: update
2023-07-30 23:49:10 +08:00
Athurg Gooth
06dbd87311
chore: split save resource asset (#1939)
* Move resource blob save into a independent function

* Support save resouce blob from Telegram like HTTP API

* Support save resouce blob download from URL to LocalStorage or S3

* fix typo
2023-07-14 11:14:10 +08:00
boojack
7e391bd53d
chore: remove resource public id (#1912)
* chore: remove resource public id

* chore: update
2023-07-08 11:29:50 +08:00
boojack
0e05c62a3b
chore: update common utils (#1908) 2023-07-06 22:53:38 +08:00
boojack
a7573d5705
refactor: migrate memo to apiv1 (#1907)
* refactor: migrate memo to apiv1

* chore: update

* chore: update

* chore: update

* chore: upate

* chore: update

* chore: update
2023-07-06 21:56:42 +08:00
boojack
1fa9f162a5
refactor: migrate resource to apiv1 (#1901) 2023-07-06 00:01:40 +08:00
Renamed from server/resource.go (Browse further)