Endpoint | Method | Description |
---|---|---|
/storage/o/<path> | GET | Get file |
/storage/m/<path> | GET | Get file metadata |
/storage/o/<path>/ | GET | Get ZIP of all files in folder |
/storage/m/<path>/ | GET | Get metadata of all files in folder |
/storage/o/<path>/ | POST | Upload file |
/storage/o/<path>/ | DELETE | Delete file |
Get file
Not needed, just access the file directly
GET /storage/o/<path-to-file>
<file>
Get file metadata
storage.getMetadata(path: string);
GET /storage/m/<path>
{
"key": "<path-to-file>",
"AcceptRanges": "bytes",
"LastModified": "2020-01-01T01:02:03.000Z",
"ContentLength": 12345,
"ETag": "Etag",
"ContentType": "<content-type>",
"Metadata": {
"token": "<auto-generated-access-token-uuid>"
}
}
Get zip of all files in folder.
Just access the path directly.
GET /storage/o/<path>/
Downloadable list.zip file
Get metadata of all files in a folder.
storage.getMetadata(path: string);
GET /storage/m/<path>/
[
{
"key": "<path-to-file>",
"AcceptRanges": "bytes",
"LastModified": "2020-01-01T01:02:03.000Z",
"ContentLength": 12345,
"ETag": "Etag",
"ContentType": "<content-type>",
"Metadata": {
"token": "<auto-generated-access-token-uuid>"
}
},
{
"key": "<other-path-to-file>",
"AcceptRanges": "bytes",
"LastModified": "2020-05-04T03:02:01.000Z",
"ContentLength": 54321,
"ETag": "Etag",
"ContentType": "<content-type>",
"Metadata": {
"token": "<auto-generated-access-token-uuid>"
}
}
]
Upload file.
storage.put(path: string, file: File);
```
### Request
`POST /storage/o/<path-to-file>`
### Response
```json
{
"key": "<path-to-file>",
"AcceptRanges": "bytes",
"LastModified": "2020-01-01T01:02:03.000Z",
"ContentLength": 12345,
"ETag": "Etag",
"ContentType": "<content-type>",
"Metadata": {
"token": "<auto-generated-access-token-uuid>"
}
}
Delete file.
storage.delete(path: string);
```
### Request
`DELETE /storage/o/<path-to-file>`
### Response
```bash
204 No Content