added curl example
ci/woodpecker/push/woodpecker Pipeline failed Details

This commit is contained in:
Malte Grosse 2024-06-13 14:25:09 +02:00
parent 82fcdf2910
commit d63a51e30e
2 changed files with 10 additions and 2 deletions

View File

@ -2,4 +2,5 @@
title = "Sandbox Documentation" title = "Sandbox Documentation"
language = "en" language = "en"
[output.html] [output.html]
default-theme = "light" theme = "midnight"
default-theme = "midnight"

View File

@ -22,10 +22,17 @@ To use the headless object storage, you can upload a file via REST-Interface or
files = {'fileUpload': (filename, open(filename, 'rb'),'text/csv')} files = {'fileUpload': (filename, open(filename, 'rb'),'text/csv')}
r = requests.post(url, files=files) r = requests.post(url, files=files)
``` ```
or using curl as command line tool:
```
curl -F fileUpload=@file.zip https://share.storage.sandbox.iuk.hdm-stuttgart.de/upload
```
**Example JSON response** **Example JSON response**
```json ```json
{ {
"PublicUrl": "https://storage.sandbox.iuk.hdm-stuttgart.de/upload/a1236b2b-49bf-4047-a536-20dab15b7777/untitled.txt", "PublicUrl": "https://share.storage.sandbox.iuk.hdm-stuttgart.de/upload/f2a69e9a-f60b-418d-a678-efce181fb8a5/untitled.txt",
"Size": 11, "Size": 11,
"Expiration": "2023-10-04T00:00:00Z" "Expiration": "2023-10-04T00:00:00Z"
} }