Deadwood-ai / file-storage-api

FastAPI backend for the Deadwood-AI file storage server
GNU General Public License v3.0
0 stars 0 forks source link

Update the metadata model to the supabase table #9

Closed mmaelicke closed 5 months ago

mmaelicke commented 5 months ago

This includes the missing mandatory information:

mmaelicke commented 5 months ago

file_type-> content_type

mmaelicke commented 5 months ago

@JesJehle, the metadata in the file storage API is aligned now. However, a few fields are called differently and I will adjust the metadata table accordingly, as soon as I build the process for that. Here is a metadata dump of a file that I uploaded via the API, with working authentication:

{
    "user_id": "cd0a891a-4964-42a5-8620-69d5d60aa0a1",
    "aquisition_date": "2020-01-01T00:00:00Z",
    "upload_date": "2024-02-20T10:22:08.261516",
    "file_name": "dataset.db",
    "content_type": "application/octet-stream",
    "file_size": 27275264,
    "target_path": "/Users/mirko/hydrocode/file-storage-api/data/raw_uploads/88f8d49f-d36a-41fc-a6f0-1d21b7bbe0de_dataset.db",
    "copy_time": 0.04211902618408203,
    "uuid": "88f8d49f-d36a-41fc-a6f0-1d21b7bbe0de",
    "sha256": "71564077fbcadb4653394528df506f08b3950b332d47b93344df14fad48ef26b",
    "platform": "airborne",
    "license": "cc-by-sa",
    "status": "pending",
    "file_id": "88f8d49f-d36a-41fc-a6f0-1d21b7bbe0de_dataset.db"
}

The only field that is dev-only is the copy_time. That will not be uploaded to supabase.

This whole comment is just for your notice. Things can be discussed in more detail in the process repository, as soon as I create that one.