writefiles
Description:
Add multiple files or directory to moibit
Request
https://api.moinet.io/moibit/v1/writefiles
Request type - POST
#
HeadersHeader Key | Header Value | Optional |
---|---|---|
nonce | <developer_nonce> | No |
signature | <signature gotten after signing developer_nonce by developer> | No |
developerKey | public id of the developer | No |
networkID | ID of the network the file want to be written to | No |
appID | ID of the app the file want to be written to | Yes |
enduser_nonce | <enduser nonce> | No if enduser has moi_id |
enduser_signature | <signature gotten after signing enduser_nonce by enduser> | No if enduser has moi_id |
enduserID | Id of the enduser if end-user doesn't have moi_id | Yes |
Content-Type: multipart/form-data
#
ParametersParam Key | Param Type | Description | Optional |
---|---|---|---|
fileName | String | File name or path (default: filename in file header) | Yes |
file | Array of Blobs | multiple files or directory of any depth | No |
keepPrevious | Boolean | Ensures that the previous version of the file was still maintained along with new file. Default:false | Yes |
createFolders | Boolean | Create folders as needed. Otherwise, if a path specified in fileName does not exist, the operation will fail. Default:true | Yes |
replication | Integer | Number of replicas the file should have. Default: Min_RF of network | Yes |
encryptionType | Integer | -1 : No Encryption 0 : Default Network Encryption 1 : Developer Key Encryption 2 : Enduser Key Encryption 3 : Custom Key Encryption 4 : MES Default: encryptionType of app or 0 if default-App | Yes |
#
Response ArrayField | Description |
---|---|
version | version of the file |
hash | Content identifier of the file |
filesize | Size of the file uploaded |
replication | Number of replicas |
encryptionType | Encryption type of file |
lastUpdated | Date and time when uploaded |
directory | Parent directory of the file being uploaded |
path | Absolute path of the file in system |
recoveryTime | Time duration till when one can recover this file once deleted |
nodeAddress | ID of the node that processed this file |