dear-digital / linter

3 stars 14 forks source link

🐞 [BUG] File Name Persistence and Upload Issue after Clearing JSON Input #47

Open anishdalvi opened 1 year ago

anishdalvi commented 1 year ago

Is there an existing issue for this?

Description

When utilizing the Upload JSON File feature, a couple of issues are observed. After selecting a JSON file for upload, the file name is correctly displayed beside the Upload JSON File button. However, if the Clear button is then pressed to clear the JSON input, the code gets removed as expected but the file name continues to persist beside the Upload JSON File button. Furthermore, attempting to re-upload the same file fails. This issue seems to arise due to the retained value of the file input element after clearing the JSON input.

When I upload text.json

image

After pressing the clear button (file name still persists)

image

Steps To Reproduce

  1. Upload a JSON file by clicking the "Upload JSON File" button and selecting a file.
  2. Notice the uploaded file name displayed beside the "Upload JSON File" button.
  3. Press the "Clear" button to clear the JSON input.
  4. Observe that the JSON input is correctly cleared, but the file name still remains beside the "Upload JSON File" button.
  5. Attempt to upload the same file again.
  6. Notice that the file does not get uploaded, possibly due to the input element retaining the previous file's value.

Screenshots

No response

What browsers are you seeing the problem on?

Chrome

OS

Windows

Have you provided all details?