mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
support mimetype
Some checks failed
build / windows (push) Has been cancelled
build / other_os (push) Has been cancelled
build / mac_amd64 (push) Has been cancelled
build / mac_arm64 (push) Has been cancelled
build / linux (push) Has been cancelled
build / go1.24 (push) Has been cancelled
build / linux_386 (push) Has been cancelled
build / lint (push) Has been cancelled
build / android-all (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/386 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/amd64 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm/v6 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm/v7 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm64 (push) Has been cancelled
Build & Push Docker Images / Merge & Push Final Docker Image (push) Has been cancelled
Some checks failed
build / windows (push) Has been cancelled
build / other_os (push) Has been cancelled
build / mac_amd64 (push) Has been cancelled
build / mac_arm64 (push) Has been cancelled
build / linux (push) Has been cancelled
build / go1.24 (push) Has been cancelled
build / linux_386 (push) Has been cancelled
build / lint (push) Has been cancelled
build / android-all (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/386 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/amd64 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm/v6 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm/v7 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm64 (push) Has been cancelled
Build & Push Docker Images / Merge & Push Final Docker Image (push) Has been cancelled
This commit is contained in:
@@ -295,8 +295,8 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
|
|||||||
// CaseInsensitive: false,
|
// CaseInsensitive: false,
|
||||||
// CanHaveEmptyDirectories: true,
|
// CanHaveEmptyDirectories: true,
|
||||||
// DuplicateFiles: true,
|
// DuplicateFiles: true,
|
||||||
// ReadMimeType: true,
|
ReadMimeType: true,
|
||||||
// WriteMimeType: false,
|
WriteMimeType: true,
|
||||||
// WriteDirSetModTime: true,
|
// WriteDirSetModTime: true,
|
||||||
// DirModTimeUpdatesOnWrite: true,
|
// DirModTimeUpdatesOnWrite: true,
|
||||||
}).Fill(ctx, f)
|
}).Fill(ctx, f)
|
||||||
@@ -1445,6 +1445,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
|
|||||||
},
|
},
|
||||||
MultipartContentName: "file",
|
MultipartContentName: "file",
|
||||||
MultipartFileName: encodedLeaf,
|
MultipartFileName: encodedLeaf,
|
||||||
|
MultipartContentType: fs.MimeType(ctx, src),
|
||||||
Path: "/uploads",
|
Path: "/uploads",
|
||||||
Options: options,
|
Options: options,
|
||||||
}
|
}
|
||||||
@@ -1469,9 +1470,9 @@ func (o *Object) ID() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MimeType returns the content type of the Object if known, or "" if not
|
// MimeType returns the content type of the Object if known, or "" if not
|
||||||
// func (o *Object) MimeType(ctx context.Context) string {
|
func (o *Object) MimeType(ctx context.Context) string {
|
||||||
// return o.mimeType
|
return o.mimeType
|
||||||
// }
|
}
|
||||||
|
|
||||||
// ParentID returns the ID of the Object parent if known, or "" if not
|
// ParentID returns the ID of the Object parent if known, or "" if not
|
||||||
func (o *Object) ParentID() string {
|
func (o *Object) ParentID() string {
|
||||||
@@ -1492,73 +1493,7 @@ var (
|
|||||||
//_ fs.MergeDirser = (*Fs)(nil)
|
//_ fs.MergeDirser = (*Fs)(nil)
|
||||||
// _ fs.DirSetModTimer = (*Fs)(nil)
|
// _ fs.DirSetModTimer = (*Fs)(nil)
|
||||||
// _ fs.ListRer = (*Fs)(nil)
|
// _ fs.ListRer = (*Fs)(nil)
|
||||||
_ fs.Object = (*Object)(nil)
|
_ fs.Object = (*Object)(nil)
|
||||||
_ fs.IDer = (*Object)(nil)
|
_ fs.IDer = (*Object)(nil)
|
||||||
// _ fs.MimeTyper = (*Object)(nil)
|
_ fs.MimeTyper = (*Object)(nil)
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
|
||||||
{
|
|
||||||
"current_page": 1,
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"id": 483924217,
|
|
||||||
"name": "go.sum",
|
|
||||||
"description": null,
|
|
||||||
"file_name": "7adf30be-2fe2-4f20-87ba-fa4e9d51e482",
|
|
||||||
"mime": "application/octet-stream",
|
|
||||||
"color": null,
|
|
||||||
"backup": false,
|
|
||||||
"tracked": 0,
|
|
||||||
"file_size": 108408,
|
|
||||||
"user_id": null,
|
|
||||||
"parent_id": 483924168,
|
|
||||||
"created_at": "2025-12-02T18:36:00.000000Z",
|
|
||||||
"updated_at": "2025-12-03T09:03:26.000000Z",
|
|
||||||
"deleted_at": null,
|
|
||||||
"is_deleted": 0,
|
|
||||||
"path": "483924168/483924217",
|
|
||||||
"disk_prefix": "7adf30be-2fe2-4f20-87ba-fa4e9d51e482",
|
|
||||||
"type": "file",
|
|
||||||
"extension": "sum",
|
|
||||||
"file_hash": null,
|
|
||||||
"public": false,
|
|
||||||
"thumbnail": false,
|
|
||||||
"mux_status": null,
|
|
||||||
"thumbnail_url": null,
|
|
||||||
"workspace_id": 0,
|
|
||||||
"is_encrypted": 0,
|
|
||||||
"iv": null,
|
|
||||||
"vault_id": null,
|
|
||||||
"owner_id": 19984,
|
|
||||||
"hash": "NDgzOTI0MjE3fA",
|
|
||||||
"url": "api/v1/file-entries/483924217",
|
|
||||||
"users": [
|
|
||||||
{
|
|
||||||
"email": "support@rclone.com",
|
|
||||||
"id": 19984,
|
|
||||||
"avatar": "https://www.gravatar.com/avatar/03a1d0a602fe31ddbaad590c21c988b8?s=&d=retro",
|
|
||||||
"model_type": "user",
|
|
||||||
"owns_entry": true,
|
|
||||||
"entry_permissions": [],
|
|
||||||
"display_name": "support"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tags": [],
|
|
||||||
"permissions": {
|
|
||||||
"files.update": true,
|
|
||||||
"files.create": true,
|
|
||||||
"files.download": true,
|
|
||||||
"files.delete": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"from": 1,
|
|
||||||
"last_page": 1,
|
|
||||||
"next_page": null,
|
|
||||||
"per_page": 1000,
|
|
||||||
"prev_page": null,
|
|
||||||
"to": 1,
|
|
||||||
"total": 1
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|||||||
Reference in New Issue
Block a user