-
Notifications
You must be signed in to change notification settings - Fork 3
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
[FEATURE] Improve local image handling #86
Comments
Firstly, kudos for making this, and, making it open source. Secondly, i'd like to contribute to solving this particular issue, mostly for selfish reasons: I came back to the site the next day after previously uploading 36 images and found all images broken. Re-uploading the same images (same names) doesn't appear to resolve this, so, it appears the list is broken with any new session and/or refreshing. I intend to work on the same tier list over multiple days, so I don't want to start from scratch each day. Proposals:
|
If the binary <-> string conversion is an issue with IndexedDb i ponder whether this is an option to cache the binary. |
Hello, and thanks for your kind words and interest in contributing to the project! If I remember correctly, my main assumption & worry with IndexedDB was about cache size. Lots of big images across many tier lists could eat up a ton of space (if it stored the images). Super rough example:
Of course, the app could shift the responsibility to the user to keep the cache size small, or just be fine with growing cache sizes. However, I was thinking of re-linking images from the same path & device. It would store the paths instead of the whole image. At runtime, it would just fetch the image, only keeping the folder info (assuming the user doesn't move or delete the images). What do you think? EDIT: Compressing the uploaded images before storing into IndexedDB could be a solution as well, although the cache would still grow overtime. |
10mb per image seems extreme to me - on the site it looks like they're displayed 80x80. Even uncompressed images of that dimension are orders of magnitude less than that. I'm not sure that the cache growing over time, due to multiple tier lists, is an issue either. If I had many tier lists I'd probably start to become more annoyed they could only be accessed via a single device/machine ;) If an 80x80 lossless PNG, converted to base64 is ~5kb - then 1,000 of those is 5mb... |
I don't disagree. However, currently there are no limitations / handling on the upload file size, so I think making it more deterministic would be ideal. Feel free to experiment. |
Is your feature request related to a problem? Please describe.
Locally uploaded files are stored as blobs that only persist temporarily. This is an intended limitation of browsers where files are stored as blobs for security reasons. As a result, users lose their uploaded images when they refresh the page or return to the application in a new session, disrupting their workflow and requiring them to re-upload all images.
Describe the solution you'd like
Implement a flexible image re-linking system that allows users to easily restore their uploaded images across sessions. The solution should:
Describe alternatives you've considered
Additional context
This feature is crucial for maintaining a smooth user experience in our tier list application, especially for users who regularly work with large sets of custom images. It aligns with our goal of providing a flexible, user-friendly interface while working within the constraints of client-side web applications.
Potential Impact
This feature would significantly improve the user experience by:
Open Source Acknowledgment
consider all feedback and feature requests, I acknowledge that my suggestion may not be implemented if it doesn't
align with the project's goals, resources, or priorities.
The text was updated successfully, but these errors were encountered: