Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

Implement better asset saving mechanism #16

Open
Nadav183 opened this issue Jun 4, 2023 · 0 comments
Open

Implement better asset saving mechanism #16

Nadav183 opened this issue Jun 4, 2023 · 0 comments

Comments

@Nadav183
Copy link
Collaborator

Nadav183 commented Jun 4, 2023

Currently the backend saves a requested book's assets as files and then re-reads them to generate the final output pdf. The pdf is again stored on the backend as a file and passes the file's location to the front end for download. This creates a few problems:

  1. The server can only generate one book at a time (two people entering the website will cause issues)

  2. Adds unnecessary complexity to the backend.

Proposed solution: keep image data in memory without saving the png files to the server. And add unique identifiers for each request that will be used in the pdf output's name. This way multiple pdfs can be generated at the same time, returned to the end-user correctly and removed safely at the end of the transaction without conflicting with other requests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant