mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 08:15:19 +08:00
1473de3f04
This change adds support for metadata on OneDrive. Metadata (including permissions) is supported for both files and directories. OneDrive supports System Metadata (not User Metadata, as of this writing.) Much of the metadata is read-only, and there are some differences between OneDrive Personal and Business (see table in OneDrive backend docs for details). Permissions are also supported, if --onedrive-metadata-permissions is set. The accepted values for --onedrive-metadata-permissions are read, write, read,write, and off (the default). write supports adding new permissions, updating the "role" of existing permissions, and removing permissions. Updating and removing require the Permission ID to be known, so it is recommended to use read,write instead of write if you wish to update/remove permissions. Permissions are read/written in JSON format using the same schema as the OneDrive API, which differs slightly between OneDrive Personal and Business. (See OneDrive backend docs for examples.) To write permissions, pass in a "permissions" metadata key using this same format. The --metadata-mapper tool can be very helpful for this. When adding permissions, an email address can be provided in the User.ID or DisplayName properties of grantedTo or grantedToIdentities. Alternatively, an ObjectID can be provided in User.ID. At least one valid recipient must be provided in order to add a permission for a user. Creating a Public Link is also supported, if Link.Scope is set to "anonymous". Note that adding a permission can fail if a conflicting permission already exists for the file/folder. To update an existing permission, include both the Permission ID and the new roles to be assigned. roles is the only property that can be changed. To remove permissions, pass in a blob containing only the permissions you wish to keep (which can be empty, to remove all.) Note that both reading and writing permissions requires extra API calls, so if you don't need to read or write permissions it is recommended to omit --onedrive- metadata-permissions. Metadata and permissions are supported for Folders (directories) as well as Files. Note that setting the mtime or btime on a Folder requires one extra API call on OneDrive Business only. OneDrive does not currently support User Metadata. When writing metadata, only writeable system properties will be written -- any read-only or unrecognized keys passed in will be ignored. TIP: to see the metadata and permissions for any file or folder, run: rclone lsjson remote:path --stat -M --onedrive-metadata-permissions read See the OneDrive backend docs for a table of all the supported metadata properties. |
||
---|---|---|
.. | ||
commands | ||
oracleobjectstorage | ||
_index.md | ||
alias.md | ||
amazonclouddrive.md | ||
authors.md | ||
azureblob.md | ||
azurefiles.md | ||
b2.md | ||
bisync.md | ||
box.md | ||
bugs.md | ||
cache.md | ||
changelog.md | ||
chunker.md | ||
combine.md | ||
compress.md | ||
contact.md | ||
crypt.md | ||
docker.md | ||
docs.md | ||
downloads.md | ||
drive.md | ||
dropbox.md | ||
faq.md | ||
fichier.md | ||
filefabric.md | ||
filtering.md | ||
flags.md | ||
ftp.md | ||
googlecloudstorage.md | ||
googlephotos.md | ||
gui.md | ||
hasher.md | ||
hdfs.md | ||
hidrive.md | ||
http.md | ||
imagekit.md | ||
install.md | ||
install.sh | ||
internetarchive.md | ||
jottacloud.md | ||
KEYS | ||
koofr.md | ||
licence.md | ||
linkbox.md | ||
local.md | ||
mailru.md | ||
mega.md | ||
memory.md | ||
netstorage.md | ||
onedrive.md | ||
opendrive.md | ||
oracleobjectstorage.md | ||
overview.md | ||
pcloud.md | ||
pikpak.md | ||
premiumizeme.md | ||
privacy.md | ||
protondrive.md | ||
putio.md | ||
qingstor.md | ||
quatrix.md | ||
rc.md | ||
release_signing.md | ||
remote_setup.md | ||
s3.md | ||
seafile.md | ||
sftp.md | ||
sharefile.md | ||
sia.md | ||
smb.md | ||
sponsor.md | ||
storj.md | ||
sugarsync.md | ||
swift.md | ||
tardigrade.md | ||
union.md | ||
uptobox.md | ||
webdav.md | ||
yandex.md | ||
zoho.md |