1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-06-26 07:01:34 +00:00
Commit Graph

70 Commits

Author SHA1 Message Date
Heran Yang
950dc9458b Remove http prefix 2025-06-25 09:59:12 +00:00
Heran Yang
e22e21c0a5 Merge branch '12.0' 2025-05-09 14:43:20 +08:00
feiniks
af4b73515c
Get dot from the end of the string (#757)
* Get dot from the end of the string

* Upgrade ci python

---------

Co-authored-by: Heran Yang <heran.yang@seafile.com>
2025-05-09 14:36:25 +08:00
feiniks
490f8d431c
Add metrics (#747)
* Add metrics

* Add obj_cache in session

---------

Co-authored-by: Heran Yang <heran.yang@seafile.com>
2025-03-31 16:46:24 +08:00
feiniks
7753e8e02a Return error message when failed to check file access (#737)
* Return error message when failed to check file access

* Update python to 3.12.9

* Update ci python

* Set error_msg to error_str

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2025-03-15 10:27:20 +08:00
feiniks
fde8864542
Return error message when failed to check file access (#737)
* Return error message when failed to check file access

* Update python to 3.12.9

* Update ci python

* Set error_msg to error_str

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2025-02-14 14:39:19 +08:00
feiniks
ee9ad5ef39
Return 409 when gc conflict (#731)
* Return 409 when gc conflict

* Go return 409 when gc conflict

* Return gc conflict when sync repo

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-12-30 15:03:54 +08:00
feiniks
2ab66f0f93
Add view for video and image (#723)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-12-09 16:55:45 +08:00
feiniks
e8c0e81b57
Add op to download or view file (#722)
* Add op to download or view file

* Use download-link op and statistic view

* Go add statictic view

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-12-05 15:08:25 +08:00
feiniks
aaa7819c34
Use post and add ip addr and user agent (#719)
* Use post and add ip addr and user agent

* Go add ip addr and user agent

* Adjust gc unit test

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-25 15:59:24 +08:00
feiniks
516eac3304
Output error and warning log (#717)
* Output error and warning log

* Adjust log level

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-23 17:33:09 +08:00
feiniks
1ceeeb2ad3
Get gc id before index blocks (#718)
* Get gc id before index blocks

* Add test gc online

* Add test gc online

* Adjust time of run gc

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-21 18:16:58 +08:00
feiniks
d727249a08 Check if file or dir is .. (#711)
* Check if file or dir is ..

* Diff and check name is ..

* Go diff and check name is ..

* Check if ignore new name or name

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-20 16:21:51 +08:00
feiniks
2cf6b99f40
Use QueryEscape to encode url path (#716)
* Use QueryEscape to encode url path

* Encode url path

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-14 14:10:02 +08:00
feiniks
ed6a292061
Read database config from seafile.conf and env (#713)
* Read database config from seafile.conf and env

* Go read database config from seafile.conf and env

* Delete ccnet.conf

* Don't need ccnet_db_name config

* Add ccnet db name env

* Delete unix_socket and don't return error when failed to read from seafile.conf

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-05 17:42:24 +08:00
feiniks
5899f110b9
Add online gc (#706)
* Add online gc core

* Add check gc when update repo

* Go add check gc when update repo

* Add gc unit test

* Support set pwd_hash for gc and fsck

* Optimize to check if block exists

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-10-24 18:34:16 +08:00
feiniks
1afed5d770
Support archive files with same name (#705)
* Support archive files with same name

* Go support archive files with same name

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-27 17:20:04 +08:00
feiniks
4adceee73d
Escape filePath before calling check file access (#703)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-20 11:26:41 +08:00
feiniks
6649fada8c
Parse file path from url (#702)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-19 16:59:35 +08:00
feiniks
61126d108c
Add json exp (#699)
* Add json exp

* Add json exp and add gen jwt token

* Gen seahub and notif jwt token

* Add exp for gen jwt token

* Delete gen_jwt_token API

* Delete set exp to 72 hour

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-18 17:59:24 +08:00
feiniks
f27ab0847b
Return error message when query share link info (#698)
* Return rsp content when query share link info

* Add parse error message

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-13 18:33:41 +08:00
feiniks
c80bf17efb
Add batch del files RPC (#694)
* Add batch del files RPC

* Add pack multi-level files

* Go add pack multi-level files

* Use change set to batch del files

* Improve args

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-13 14:58:45 +08:00
feiniks
b2bde11d89
Add download file API (#696)
* Add download file API

* Go add download file API

* Set http header and return http error

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-12 11:02:41 +08:00
feiniks
d01c46e2f9
Add cookie to check share link access (#691)
* Add cookie to check share link access

* Modify user agent and add timeout

* Add filename to attachment

* Go set filename to attach

* C set filename to attachment

* Adjust position of check priviate key

* Set Content-Type and User-Agent

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-06 11:40:42 +08:00
feiniks
95bad895b4
Add upload link and download link API (#683)
* Add upload link and download link API

* Use go 1.22 for ci

* Go add upload link API

* Add norm UTF8 path

* Go add upload link API

* Add seahub_settings.py

* Add projectDir

* Add download link API

* Set and check etag

* Add comment and set no-cache

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-03 18:19:37 +08:00
feiniks
6944257cc8
Add timeout when query from database (#685)
* Add timeout when query from database

* Modify DefaultTimeout to DBOpTimeout

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-29 15:10:55 +08:00
feiniks
738716496a
Fix security issue and add go linter (#677)
* Fix security issue and add go linter

* Fix error checked by golangci-lint

* Delete jwt-go pkg

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-12 14:59:45 +08:00
feiniks
9930112249
Go use Authorization header (#676)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-02 10:35:03 +08:00
feiniks
7d26e0a8f4
Skip merge when post files with replace existed (#671)
* Skip merge when post files with replace existed

* Use handle_concurrent_update to check if merge commits

* Go handle concurrent update

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-27 10:39:09 +08:00
feiniks
6c056c1f6b
Add last_modify field in form (#666)
* Add last_modify field in form

* Go add last_modify field in form

* Use rfc3339 time format

* Add mtime for upload_blks_api

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-23 18:52:15 +08:00
feiniks
49168a140c
Add ETag for access file (#664)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-09 16:58:35 +08:00
feiniks
058b7405f1
Fix download file traffic statistics error (#651)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-03-13 19:49:03 +08:00
feiniks
2d667a5c99
Check files with same name before post (#638)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-11-22 16:57:13 +08:00
feiniks
b5993456e3
Add retry count to 10 (#609)
* Add retry count to 10

* Add sleep interval and print max retry count

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-04-21 17:53:29 +08:00
feiniks
db09baec1b
Handle crypt for zip files (#606)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-04-04 14:07:28 +08:00
feiniks
6ca4f18d31
Fix define type error (#604)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-03-16 11:37:47 +08:00
feiniks
9173f217a4
Send repo update event to notification server (#602)
* Send repo update event to notification server

* Add option to manage configuration

* Init default options at start

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-03-11 12:14:39 +08:00
feiniks
dcda34478f
go fileserver write header before write body (#591)
* go fileserver write header before write body

* Set json header when ret-json is true

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-01-29 15:59:24 +08:00
杨赫然
852bc4bd38 Merge branch '9.0' 2022-12-29 13:47:54 +08:00
feiniks
5289841dd8
Fix error in calculating the number of blocks (#588)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-12-29 12:32:22 +08:00
杨赫然
5c741c15ca Merge branch '9.0' 2022-12-06 14:47:15 +08:00
feiniks
f02d2e5304
Fix root_id is empty in commit (#586)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-12-06 14:38:45 +08:00
feiniks
df78d10ec1 Reuse zlib ReadCloser and add timeout for get fs id list (#508)
* Reuse zlib ReadCloser and add timeout for get fs id list

* Reuse zlib reader

* Get seafile and seafdir with zlib reader

Co-authored-by: 杨赫然 <heran.yang@seafile.com>

Use json-iterator/go to parse fs objects (#510)

Co-authored-by: 杨赫然 <heran.yang@seafile.com>

Add cache for seafdir (#511)

* Add cache for seafile and seafdir

* Add ttl for fs cache

* Use MB unit and add a comment

Co-authored-by: 杨赫然 <heran.yang@seafile.com>

Close object after reading finished (#512)

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-12-06 10:45:39 +08:00
feiniks
620438fbb5
Clean go unused log (#579)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-10-14 12:10:53 +08:00
feiniks
04350f2b99
Merge same repo once and check fs object is valid (#578)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-09-28 16:43:07 +08:00
feiniks
be260e4c6a
Clear error when retry upload (#568)
* Clear error when retry upload

* Add go_log_level option

* Fix type mismatch

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-07-21 16:29:47 +08:00
feiniks
318e850ccb
Go Retry upload when detecting concurrent uploads (#567)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-07-20 11:25:58 +08:00
feiniks
3a47cf7ab2
Fix normalize utf8 path for go (#565)
* Fix normalize utf8 path for go

* Fix normalize utf8 path for go
2022-07-13 18:18:32 +08:00
feiniks
e7f96976e9
Fix downloading non-ASCII filename (#555)
* Fix downloading non-ASCII filename

* Add comment

* Modify comment
2022-05-25 09:37:58 +08:00
feiniks
5e33fc3476
Go fileserver support enc v3 repo (#552)
* Go fileserver support enc v3 repo

* add comment
2022-04-11 18:48:18 +08:00