Sprint 2 | Admin | Book C.R.U.D | Book file processing and addition
To-Do:
-
Implement an endpoint to receive a PDF file containing the book
-
Validate the PDF file format upon upload
-
Process the PDF file to extract sections based on special divider characters
The service receives a PDF file containing a book with special divider characters to identify sections.
The system processes the PDF and stores it in the database.
Given a valid PDF file containing a book with special divider characters is sent to the upload endpoint
When the PDF file is uploaded to the service
Then the service should process the PDF and identify sections based on the divider characters
And check if the book exists in the database
And if the book exists, the service updates the book's existing entry with the newly generated PDF file
Given a valid PDF file containing a new book with special divider characters is sent to the upload endpoint
When the PDF file is uploaded to the service
Then the service should process the PDF and identify sections based on the divider characters
And convert the processed content into an PDF file
And if the book does not exist in the database, it should be added
And the PDF file should be stored in the database as part of the new book