Bug fixing

This commit is contained in:
Your Name
2025-05-25 13:07:03 +12:00
parent 21d079f285
commit 7b3706ebf5
5 changed files with 68 additions and 65 deletions

View File

@@ -4,7 +4,7 @@ A simple object storage system that stores files with metadata and provides a RE
## Features
- Store files with metadata (labels, tags, and custom fields)
- Store files with metadata (label:tag pairs and custom fields)
- Retrieve files by hash or label:tag combination
- Check if a file exists by hash or label:tag
- Delete files by hash
@@ -47,8 +47,7 @@ PUT /upload
Parameters:
- `file`: The file to upload
- `metadata`: JSON object containing:
- `labels`: Array of strings (required)
- `tags`: Array of strings (required)
- `labeltags`: Array of strings in "label:tag" format (required)
- Additional custom fields (optional)
Example:
@@ -56,7 +55,7 @@ Example:
curl -X PUT \
-H "Authorization: Bearer your-token" \
-F "file=@example.txt" \
-F 'metadata={"labels":["test"],"tags":["latest"],"description":"Example file"}' \
-F 'metadata={"labeltags":["test:latest","project:alpha"],"description":"Example file"}' \
http://localhost:8080/upload
```
@@ -115,9 +114,8 @@ The system uses SQLite to store metadata about uploaded files. The database sche
```sql
CREATE TABLE objects (
hash TEXT PRIMARY KEY,
labels TEXT NOT NULL, -- JSON array of labels
tags TEXT NOT NULL, -- JSON array of tags
metadata TEXT NOT NULL -- JSON object with additional metadata
labeltags TEXT NOT NULL, -- JSON array of label:tag pairs
metadata TEXT NOT NULL -- JSON object with additional metadata
);
```