srt-ai icon indicating copy to clipboard operation
srt-ai copied to clipboard

"Browse for SRT file..." button doesn't work

Open Crypt0zauruS opened this issue 1 year ago • 2 comments

Hi, "Browse for SRT file..." button in Form.tsx doesn't work for me. I've made it working with a small change:

I've replaced the div

`

  Browse for SRT file…

`

by this code:

`

  <input
                id="fileInput"
                type="file"
                accept=".srt"
                onChange={(e) => setFile(e.target.files![0])}
                className="absolute inset-0 opacity-0 cursor-pointer"
    />

   <button
                type="button"
                className="rounded-sm bg-[#d9d9d9] py-2 px-2"
                onClick={() => {
                  const fileInput = document.getElementById("fileInput");
                  if (fileInput) {
                    fileInput.click();
                  }
                }}
              >
                Browse for SRT file…
     </button>

` Everything works now Thank you

Crypt0zauruS avatar Feb 18 '24 18:02 Crypt0zauruS