This commit is contained in:
Your Name
2025-05-25 11:03:49 +12:00
parent 161606a86a
commit 89bdd04ff8
5 changed files with 95 additions and 55 deletions

View File

@@ -42,15 +42,10 @@ Write actions:
- to upload a file (via http put)
```
curl -X PUT \
-H "Content-Type: application/json" \
-d '{
"label": "example",
"filename": "example.txt",
"description": "Example file",
"tags": ["test", "example"],
"custom_field": "custom value"
}' \
"http://localhost:8123/upload?token=YOUR_TOKEN"
-H "Authorization: Bearer YOUR_TOKEN" \
-F "file=@/path/to/your/file.txt" \
-F 'metadata={"labeltag":"example:latest","description":"Example file","tags":["test","example"],"custom_field":"custom value"}' \
"http://localhost:8123/upload"
```
- the object_file is uploaded, hashed, added to the registry (if that hash doesn't already exist), and {label:tag,hash} entries are added to the directory index.
- matching tags on older versions are removed.