This commit is contained in:
2023-02-14 19:25:44 +01:00
parent d55cbd980b
commit 67b48aaa1f
9 changed files with 1150 additions and 0 deletions

20
upd/README.md Normal file
View File

@@ -0,0 +1,20 @@
## Test the server
### single file upload
curl -X POST localhost:8080/api/putfile -F "upload[]=@/home/scip/2023-02-06_10-51.png" -H "Content-Type: multipart/form-data"
get with:
curl -o x http://localhost:8080/api/getfile/05988587-cc1c-4590-9dc0-564b8a912686/2023-02-06_10-51.png
### multiple files upload
curl -X POST localhost:8080/api/putfile -F "upload[]=@/home/scip/2023-02-06_10-51.png" -F "upload[]=@/home/scip/pgstat.png" -H "Content-Type: multipart/form-data"
## TODO
- return HTTP errors as JSON as well
- add auto expire customization, e.g. expire after 1 day
- add cleanup storage per api call (single id and everything)
- add oauth2