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

[Feature Request] using CacheStorage to store image #5013

Closed
lloydzhou opened this issue Jul 15, 2024 · 1 comment · Fixed by #5061
Closed

[Feature Request] using CacheStorage to store image #5013

lloydzhou opened this issue Jul 15, 2024 · 1 comment · Fixed by #5061
Labels
enhancement New feature or request

Comments

@lloydzhou
Copy link
Contributor

lloydzhou commented Jul 15, 2024

🥰 Feature Description

#2393 #4574 #3994 #2433 #5002 #5015

using base64 string to save image content to localstorage, get error: QuotaExceededError

add new scheme: indexdb://{file_name} to read and write file in indexdb.

using CacheStorage to store image

🧐 Proposed Solution

add new scheme: indexdb://{file_name} to read and write file in indexed db

using CacheStorage to store image

  1. uploadImage using fetch
  2. hook upload api in serviceWorker: save in CacheStorage and return cache file url
  3. component using img show image content, then serviceWorker get from CacheStorage

📝 Additional Information

https://caniuse.com/?search=IndexedDB
image

https://caniuse.com/?search=cachestorage
image

@lloydzhou lloydzhou added the enhancement New feature or request label Jul 15, 2024
@lloydzhou

This comment was marked as outdated.

lloydzhou added a commit to OpenAI-Next/NextChat that referenced this issue Jul 15, 2024
@lloydzhou lloydzhou changed the title [Feature Request] add new scheme: indexdb://{file_name} to read and write file in indexdb [Feature Request] using CacheStorage to store image Jul 15, 2024
lloydzhou added a commit to ConnectAI-E/ChatGPT-Next-Web that referenced this issue Jul 19, 2024
Dogtiti added a commit that referenced this issue Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant