mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: add support for download resource from link (#1800)
* Add support for download resource from link * Parse external link and add file ext name from mime info * Add zh-Hans locale for `download-link` * fix typo on code and comments * Update server/resource.go --------- Co-authored-by: Athurg Feng <athurg@gooth.org> Co-authored-by: boojack <stevenlgtm@gmail.com>
This commit is contained in:
@ -26,13 +26,14 @@ type ResourceCreate struct {
|
||||
CreatorID int `json:"-"`
|
||||
|
||||
// Domain specific fields
|
||||
Filename string `json:"filename"`
|
||||
Blob []byte `json:"-"`
|
||||
InternalPath string `json:"internalPath"`
|
||||
ExternalLink string `json:"externalLink"`
|
||||
Type string `json:"type"`
|
||||
Size int64 `json:"-"`
|
||||
PublicID string `json:"publicId"`
|
||||
Filename string `json:"filename"`
|
||||
Blob []byte `json:"-"`
|
||||
InternalPath string `json:"internalPath"`
|
||||
ExternalLink string `json:"externalLink"`
|
||||
Type string `json:"type"`
|
||||
Size int64 `json:"-"`
|
||||
PublicID string `json:"publicId"`
|
||||
DownloadToLocal bool `json:"downloadToLocal"`
|
||||
}
|
||||
|
||||
type ResourceFind struct {
|
||||
|
Reference in New Issue
Block a user