Drive Files: Overview of Methods
You can store text documents, spreadsheets, presentations, images, and other information on Drive. Users can upload, edit, copy files, and configure access permissions for them.
Quick navigation: all methods
How to Manage Files
A new file should be uploaded using the disk.folder.uploadfile method to a folder by its identifier.
You can change the location of files within the Drive structure: move them using the disk.file.moveto method or copy them to other folders using the disk.file.copyto method.
You can retrieve file field values using the disk.file.get method. For example, to check if a file has been moved to the trash.
You can rename a file using the disk.file.rename method.
User Documentation
File Versions
You can obtain a list of file versions using the disk.file.getVersions method. This method uses the file identifier as a parameter.
To get information about a version, use the disk.version.get method. This method takes a parameter with the version identifier, not the file identifier.
Drive tools allow you to restore the desired version of a file. This is done using the disk.file.restoreFromVersion method.
You can upload a new version of a file using the disk.file.uploadversion method.
User Documentation
Access for External Users
To provide access to a file for an external user, you need to create a public link. This will allow you to share the file with people who do not have access to Bitrix24. You can obtain a public link for a file using the disk.file.getExternalLink method.
User Documentation
How to Delete Files
Files can be moved to the trash using the disk.file.markdeleted method. Deleted files can be restored using the disk.file.restore method within 30 days.
To permanently delete a file without the possibility of recovery, you need to use the disk.file.delete method. This will destroy the file forever.
User Documentation
Overview of Methods
Scope:
diskWho can execute the method: any user
|
Method |
Description |
|
Returns the description of file fields |
|
|
Returns the file by identifier |
|
|
Renames the file |
|
|
Copies the file to the specified folder |
|
|
Moves the file to the specified folder |
|
|
Deletes the file forever |
|
|
Moves the file to the trash |
|
|
Restores the file from the trash |
|
|
Uploads a new version of the file |
|
|
Returns the list of file versions |
|
|
Restores the file from a specific version |
|
|
Returns a public link to the file |