Connect to the database and make an API endpoint to save the image on the disk and register it to the database. The data should be stored like this:
When adding a new entry:
{
"id": 123,
"image_src": "localhost://app.demo/assets/img.jpg'",
"prompt": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
"status": "new"
}
After making and API request to processing:
{
"id": 123,
"image_src": "localhost://app.demo/assets/img.jpg'",
"prompt": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
"status": "processing"
}
After finishing:
{
"id": 123,
"image_src": "localhost://app.demo/assets/img.jpg'",
"prompt": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
"status": "done"
}
Connect to the database and make an API endpoint to save the image on the disk and register it to the database. The data should be stored like this:
When adding a new entry:
After making and API request to processing:
After finishing: