ai-cfia / nachet-backend

A flask-based backend for Nachet to handle Azure endpoint and Azure storage API requests from the frontend.
MIT License
1 stars 3 forks source link

Implement API route for picture batch import #74

Closed MaxenceGui closed 3 weeks ago

MaxenceGui commented 3 months ago

Description :rocket:

sequenceDiagram;  autonumber
  actor User
  participant Frontend
  participant Backend
  participant Datastore

    User ->>+Frontend: Upload session request
    Frontend->>+Backend: HTTP Post Req.
    Backend->>+Datastore: get_all_seeds_names(cursor)
    Datastore-->>-Backend: seed_names res.
    Backend->>+Datastore: is_user_registered(cursor, email)
    Datastore-->>-Backend: user_id res.
    Backend-->>-Frontend: seedNames res.
    Frontend -->>-User: Show session form
    User -) User: Fill form :<br> Seed selection, nb Seeds/Pic, Zoom
    User -)+Frontend: Upload: session folder
    Frontend ->>+Backend: Upload from trusted user request: <br> Seed info, nbSeeds/Pic, Zoom ,<br> Session Folder & User
    Backend -)Datastore: upload_picture_set (cursor, pictures, user_id, <br> seed_name, zoom_level, nb_seeds)
    Note over User, Datastore: Refer to the graph from issue 75 for the rest of the diagram

With collaborative effort from the Frontend and the datastore, Nachet Backend needs to implement a new route to allow our users to import a folder of images. The new route must be able to scale with the latest change to the upload picture from trusted user functionality and be able to work with a large payload that might exceed the Quart maximum content length.

Acceptance Criteria ✅

Tasks 🛠️

Additional Context 📌

Related issue:

MaxenceGui commented 2 months ago

Issue status update

See update on the pull request