Upload a File
This method can handle two different calls, one where a file path is passed, and a second where it does not receive a , and it means we are going to use the MD5 of the file as the file name.
Using file name:
URL: > files/{bucketname}/{path:.*}
HTTP Method: PUT
Response: if the file was uploaded, returns:
{
"bucket": "<bucket name>",
"objectName": "<file name>",
"parentPath": "<file path>",
"checksum": "<MD5 checksum>",
"size": <file size>
}
``
Example
```text
curl -X PUT -T ~/Downloads/image1.jpg PUT http:localhost:8080/files/bucket1/folder1/folder2/image.jpg
``
Response:
```json
{
"bucket": "bucket1",
"objectName": "image.jpg",
"parentPath": "/folder1/folder2/",
"checksum": "86af350cbceb14672fdcaee11bc2571a",
"size": 66779
}Without file name:
URL: > files/{bucketname}/{path:.*}
HTTP Method: PUT
Response: if the file was uploaded, returns:
Example:
Response:
Get a File
Delete a file
Example:
List Files
This method list all the file names under a bucket and parent path (folder)
Example 1:
Example 2:
Response:
App Ready
Check if the app is ready:
Last updated
Was this helpful?