Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • VIR - backend VIR - backend
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VIR - Visual Interactive Reading
  • VIR - backendVIR - backend
  • Issues
  • #8

Closed
Open
Created Oct 03, 2024 by Arthur Da Silva Maia@arthur.maiaMaintainer0 of 8 tasks completed0/8 tasks

Sprint 2 | Admin | Book C.R.U.D | Book image database addition

To-Do:

  • Implement an endpoint to receive a picture file for a book
  • Validate the picture file format upon upload
  • Extract metadata from the picture file to identify the related book
  • Check if the book already exists in the database
  • If the book exists, update the book's picture
  • If the book does not exist, add the new book and associate the picture with it
  • Handle invalid or corrupted picture files
  • Return appropriate error messages for invalid uploads or books not found

Feature: Upload and process a book picture

The service receives a picture file for a book, which is processed and stored in the database.
The system validates whether the book exists before adding or updating the picture.

Scenario: Upload picture for an existing book

Given a valid picture file for an existing book is sent to the upload endpoint
When the picture file is uploaded to the service
Then the service should extract metadata to identify the book
And check if the book exists in the database
And if the book exists, the service updates the book's picture with the new file

Scenario: Upload picture for a new book

Given a valid picture file for a new book is sent to the upload endpoint
When the picture file is uploaded to the service
Then the service should extract metadata to identify the book
And if the book does not exist in the database, it should be added
And the new picture should be associated with the new book in the database

Scenario: Upload picture for a non-existent book

Given a picture file for a non-existent or invalid book is sent to the upload endpoint
When the picture file is uploaded to the service
Then the service should return an error response indicating the book was not found in the system

Scenario: Upload invalid or corrupted picture file

Given an invalid or corrupted picture file is sent to the upload endpoint
When the file is uploaded to the service
Then the service should return an error response indicating the picture file could not be processed

Edited Oct 03, 2024 by Arthur Da Silva Maia
Assignee
Assign to
Time tracking