Commit Graph

35 Commits (5084d98398144e6ccd9cc627ada5cb54d7dbb526)

Author SHA1 Message Date
Andy Hsu 9ff83a7950 feat: add `header` to `meta` (ref #5317) 2023-10-02 16:43:29 +08:00
Andy Hsu 882112ed1c feat: add `hash_info` field to `/fs/get` (close #5259) 2023-09-22 15:20:04 +08:00
Sean 6308f1c35d
fix: updateTime, createTime and HashInfo (#5111) 2023-08-29 13:31:24 +08:00
Sean a3748af772
feat: misc improvements about upload/copy/hash (#5045)
general: add createTime/updateTime support in webdav and some drivers
general: add hash support in some drivers
general: cross-storage rapid-upload support
general: enhance upload to avoid local temp file if possible
general: replace readseekcloser with File interface to speed upstream operations
feat(aliyun_open): same as above
feat(crypt): add hack for 139cloud

Close #4934 
Close #4819 

baidu_netdisk needs to improve the upload code to support rapid-upload
2023-08-27 21:14:23 +08:00
Noah Hsu 571bcf07b0 fix(alias): add api prefix for proxy url (close #4392) 2023-05-19 00:12:57 +08:00
Andy Hsu 0f8a84f67e perf(alias): disabled log on fs call (close #4054) 2023-04-07 00:02:07 +08:00
Andy Hsu 86beadc0ed fix: missed sign with enable `sign_all` (close #3957) 2023-03-26 16:19:01 +08:00
BaiYi 112363031a
feat: add fine-grained control for link signing (#3924)
* Determine whether the URL requires Sign

* Add File and Mem based KV

NOT TESTED: TokenKV Function

* Change Token KV func to common func.

Add File based KV func

* Remove KV, Remove Token

I found that the original Sign function is enough to complete the link signature, and only need to add simple configuration items to meet the requirements.

* Add IsStorageSigned func to judge if Signing is enabled in the storage settings.

It should be working now.

* Add a SIGN button to the management panel.

* Add enable_sign to the basic storage struct.

Can enable sign for every driver now.

Bug: When sign enabled, in download page, Copy link doesn't contain a sign.

(Not done yet)

* Fix a bug from commit 8f6c25f.

Response of fsread function does not contain sign.

* Optimize code and follow advices.

- Add back public/dist/README.md

- Enable sign when DownProxyUrl is enabled

- Merge needSign() to isEncrypt() in fsread.go

* simplify code

---------

Co-authored-by: Andy Hsu <i@nn.ci>
2023-03-24 22:44:33 +08:00
zhengxiexie c6af22b97e
feat: add thumbnail to `fs/get` api (#3927) 2023-03-23 13:59:39 +08:00
foxxorcat 62a06fa0f9
feat: optimize file operation interface (#2757)
* feat: optimize file operation interface

* chore: fix typo

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-20 15:02:40 +08:00
foxxorcat 6024e8d832
refactor: split the db package hook and cache to the op package (#2747)
* refactor:separate the setting method from the db package to the op package and add the cache

* refactor:separate the meta method from the db package to the op package

* fix:setting not load database data

* refactor:separate the user method from the db package to the op package

* refactor:remove user JoinPath error

* fix:op package user cache

* refactor:fs package list method

* fix:tile virtual paths (close #2743)

* Revert "refactor:remove user JoinPath error"

This reverts commit 4e20daaf9e.

* clean path directly may lead to unknown behavior

* fix: The path of the meta passed in must be prefix of reqPath

* chore: rename all virtualPath to mountPath

* fix: `getStoragesByPath` and `GetStorageVirtualFilesByPath`

is_sub_path:

/a/b isn't subpath of /a/bc

* fix: don't save setting if hook error

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-18 19:51:20 +08:00
Noah Hsu 4980b71ba3 fix: add hide check to `canAccess` (close #2532) 2022-11-30 22:01:33 +08:00
Noah Hsu b5bf5f4325 fix: check if the req path is relative path (close #2531) 2022-11-30 21:38:00 +08:00
Noah Hsu 83644dab85 fix: mapping filename in `GetName`
some missed filename mapping
2022-11-30 20:46:54 +08:00
Noah Hsu ddcba93eea
feat: multiple search indexes (#2514)
* refactor: abstract search interface

* wip: ~

* fix cycle import

* objs update hook

* wip: ~

* Delete search/none

* auto update index while cache changed

* db searcher

TODO: bleve init issue

cannot open index, metadata missing

* fix size type

why float64??

* fix typo

* fix nil pointer using

* api adapt ui

* bleve: fix clear & change struct
2022-11-28 13:45:25 +08:00
Noah Hsu 85e1350af8 fix: check password while upload (close #2444) 2022-11-22 16:14:01 +08:00
Noah Hsu c09800790b feat: custom filename char mapping
fixes #2447 #2446 #2440 #2409 #2006 #1979 #1507 #324 #691 #518 #430
2022-11-22 15:54:18 +08:00
Gerhard Tan 00de9bf16d
fix!: sign with the raw path instead of filename (#2258) 2022-11-11 16:24:25 +08:00
Noah Hsu 26a29f20c3 fix: missed encode path while use down proxy (close #2208) 2022-11-06 14:46:47 +08:00
Noah Hsu c7f6684eed chore: add `provider` to fs list resp 2022-09-22 16:04:10 +08:00
Noah Hsu 66b2562d03 fix: allow force root while fetch dirs (close #1671) 2022-09-14 19:57:39 +08:00
Noah Hsu 54ae6dce0b fix(fs/get): rawURL if use proxy (close #1664) 2022-09-13 20:02:57 +08:00
foxxorcat 6b5236f52e feat: add baidu_photo driver 2022-09-12 17:10:02 +08:00
Noah Hsu 77a6aa487b chore: cancel sign if no password 2022-09-11 14:14:14 +08:00
Noah Hsu 68a125491b chore: add refresh arg in list func 2022-08-29 19:15:52 +08:00
Noah Hsu 02e2c809a8 chore: rename some request param 2022-08-14 23:52:14 +08:00
Noah Hsu 06e15fc149 feat: encode path of url (close #1351) 2022-08-12 14:51:23 +08:00
Noah Hsu af884010d1 feat: local storage image thumbnail 2022-08-11 20:32:17 +08:00
Noah Hsu 669ccc40a1 chore: change related of fs get api 2022-08-10 10:48:14 +08:00
Noah Hsu d6437a337f feat: add provider to obj get api 2022-08-08 00:58:32 +08:00
Noah Hsu 61fa6f38a8 feat: add type to fs read api 2022-08-08 00:51:05 +08:00
Noah Hsu 1fd4ebe53e feat: add related objs while get obj 2022-08-07 21:01:29 +08:00
Noah Hsu 721f18a7f4 feat: fs other api 2022-08-03 14:14:37 +08:00
Noah Hsu 2a68c3cc7b feat: add thumbnail to list resp 2022-08-03 13:03:45 +08:00
Noah Hsu dc38f21294 chore: rename controllers to handles 2022-07-11 17:12:50 +08:00