Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store thumbnail version for all image attachment #1266

Open
nitrosx opened this issue Jun 12, 2024 · 0 comments
Open

Store thumbnail version for all image attachment #1266

nitrosx opened this issue Jun 12, 2024 · 0 comments

Comments

@nitrosx
Copy link
Contributor

nitrosx commented Jun 12, 2024

SciCat BE currently store the binary format of any attachment. If it the attachment is an image, the BE will always return the original size. This can result in a higher bandwidth usage if many images are requested and a lower resolution is requested.

Proposed solution:

  • When BE receives a request to store an attachment, it will store the original file as blob in a document, together with a linked document containing a thumbnail version of the image or of the icon related t the content of the attachment.
  • When BE receives a request to retrieve an attachment, the request should contains the format requested. Something like: original, thumbnail. The Response will contains the matching size.

In case, the attachment is not an image, we could associated a standard thumbnail defined in configuration

Alternative solution:

  • upon a post, the BE will store the original file as binary blob together with the type.
  • when BE receives a get, the request should contains the expected output.
    In case of an image, we could return the original, thumbnail format or width_x_height
    In case of any other type of file, we could return the original file or the matching icon in various size.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant