Closed mmaelicke closed 5 months ago
I would suggest, The upload API takes the image together with a JSON object, the structure could be enforced or not. On the frontend, I build the JSON based on the form input. You make a simple python package as a wrapper for the storage API, which Clemens can use to programmatically upload images with corresponding metadata.
You can checkout the save-metadata
branch. It solves #1 and implemented the 'platform' of the image as metadata field. The correct type annotation renders a most-helpful documentation from the OpenAPI 3.0 docs, which you can find at http://localhost:8000/docs
, then hit 'Try out' on the /upload path.
Query parameters works very similar. You can also upload any file through the docs and inspect the json, which will be created. Maybe things become a bit clearer then.
This would be my goto way, before we just send JSON objects from the frontend, which we can still decide to do, if fields turn out to be too much work on frontend implementation.
Hey @JesJehle,
This is the most basic API function to manage large file uploads on the Storage Server for Deadwood-AI. Uploading works fine, even for GB-sized files. Question is now, how to handle meta-data upload. I see two ways here:
I personally would prefer option 2, specifically, because I like to build infrastructure that is designed along common patterns, but at the end of the day, you can make the decision, because it will have the larger impact on the frontend