You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The oppia-thumbnail-uploader component uses localStorage to temporarily store images. But, if we have multiple images, i.e., multiple oppia-thumbnail-uploader components on a single page, then it's hard to know which image belongs to which component as the key is unknown.
The second issue is that we upload the image as soon as we confirm the upload, but we would like to upload the image only when the user saves changes in the parent component, i.e., upload images when needed.
The issue has two parts:
(a) Emit the filename/key when saving an image to localStorage so the parent can listen to that event for a particular image.
Suppose we need multiple images to be uploaded when creating something. In this case, the entityId is unknown, so we use localStorage strategy to temporarily store images in session storage. We then send the image blob data to the backend and handle the image upload there. However, the issue here is that we don't know which key the image is stored under in localStorage.
(b) Update this component so that the parent component has control over when to upload an image.
Currently, when changing the file, the image is immediately uploaded, even if the user closes the main component that uses this. This wastes a lot of storage. So, it would be good if we only upload image when need to,
URL of the page where the issue is observed.
N/A
Steps To Reproduce
N/A
Expected Behavior
(a) We should be able to handle as many images as we want using this component on a single page.
(b) Be able to control when to upload an image.
Screenshots/Videos
No response
What device are you using?
Desktop
Operating System
Linux
What browsers are you seeing the problem on?
Other
Browser version
1.62.156 (Brave)
Additional context
No response
Tips for developers
Before addressing the bug, please identify which PR caused the issue (you can follow the steps here). If you identify the PR, comment on the issue with a link to it. If not, mention the commit hash of the oldest commit you saw the bug on (and the month and year it was made in).
Then, please leave a comment with details of the approach that you plan to take to fix the issue (see example).
Note: If this is your first Oppia issue, please make sure to follow our guidelines for choosing an issue and setting things up. You will also need to show a demo of the fix working correctly on your local machine. Thanks!
The text was updated successfully, but these errors were encountered:
Describe the bug
The oppia-thumbnail-uploader component uses localStorage to temporarily store images. But, if we have multiple images, i.e., multiple oppia-thumbnail-uploader components on a single page, then it's hard to know which image belongs to which component as the key is unknown.
The second issue is that we upload the image as soon as we confirm the upload, but we would like to upload the image only when the user saves changes in the parent component, i.e., upload images when needed.
The issue has two parts:
(a) Emit the filename/key when saving an image to localStorage so the parent can listen to that event for a particular image.
Suppose we need multiple images to be uploaded when creating something. In this case, the entityId is unknown, so we use localStorage strategy to temporarily store images in session storage. We then send the image blob data to the backend and handle the image upload there. However, the issue here is that we don't know which key the image is stored under in localStorage.
(b) Update this component so that the parent component has control over when to upload an image.
Currently, when changing the file, the image is immediately uploaded, even if the user closes the main component that uses this. This wastes a lot of storage. So, it would be good if we only upload image when need to,
URL of the page where the issue is observed.
N/A
Steps To Reproduce
N/A
Expected Behavior
(a) We should be able to handle as many images as we want using this component on a single page.
(b) Be able to control when to upload an image.
Screenshots/Videos
No response
What device are you using?
Desktop
Operating System
Linux
What browsers are you seeing the problem on?
Other
Browser version
1.62.156 (Brave)
Additional context
No response
Tips for developers
Before addressing the bug, please identify which PR caused the issue (you can follow the steps here). If you identify the PR, comment on the issue with a link to it. If not, mention the commit hash of the oldest commit you saw the bug on (and the month and year it was made in).
Then, please leave a comment with details of the approach that you plan to take to fix the issue (see example).
Note: If this is your first Oppia issue, please make sure to follow our guidelines for choosing an issue and setting things up. You will also need to show a demo of the fix working correctly on your local machine. Thanks!
The text was updated successfully, but these errors were encountered: