Wiki source code of file_storage/modify_file.php
Last modified by YellowFox_RD on 2024/12/19 10:11
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | (% class="box" %) | ||
2 | (((Table of Contents))) | ||
3 | {{toc/}} | ||
4 | |||
5 | Allows editing the meta information of a single file from file storage. | ||
6 | = Description = | ||
7 | **(% class="green mark" %)GET(%%)**//** /file_storage/modify_file.php?company**=RTI_COMPANYKEY**&import**=IMPORTKEY**&file**=UUID**&action**=action// | ||
8 | = Parameters = | ||
9 | |=Parameter|=Description|=Type|=Note|=Mandatory | ||
10 | |company|RTI company key|string||yes | ||
11 | |import|RTI import key|string||yes | ||
12 | |file|UUID of requested file|string|You can receive this value via file_storage/get_overview.php or a sreturn value from file_storage/upload_file.php, if the file was directly uploaded via RTI.|yes | ||
13 | |action|action type|string|possible values: | ||
14 | ((( | ||
15 | * BIN: move file to bin | ||
16 | * DELETE: delete file permanently (attention: This removes the file permanently so it can not be restored!) | ||
17 | * RESTORE: restore a file from bin | ||
18 | * RENAME: change shown name of file | ||
19 | * MOVE: move file to another directory | ||
20 | )))|yes | ||
21 | |name|new name of file|string|only relevant if action "RENAME"|(yes) | ||
22 | |path|new path of file|string|only relevant if action "MOVE" | ||
23 | Format: folder/subfolder/.../target folder (separated by /) | ||
24 | Root does not have to be specified. To move the file to root directory, just leave the param empty. | ||
25 | Paths are case insensitive.|(no) | ||
26 | |||
27 | = Return = | ||
28 | On success you will receive "OK". On missing parameters or errors you will receive "(% class="error" %)**ERROR:description**(%%)". | ||
29 | = Example calls = | ||
30 | **set a new name** | ||
31 | {{code language="java"}}https://map.yellowfox.de/rti/file_storage/modify_file.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY&file=UUID&action=RENAME&name=neuer name{{/code}} | ||
32 | |||
33 | **move file** | ||
34 | {{code language="java"}}https://map.yellowfox.de/rti/file_storage/modify_file.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY&file=UUID&action=MOVE&path=Bilder/Fotos{{/code}} | ||
35 |