Hello,
I am using a "File Button" component to upload csv files that can be fairly large (~100mb). I do not parse the values. I have a "Change" event handler set to run a javascript query, which performs some minor functions before triggering an S3 upload. I have "Loading" on the button set to true when the javascript is running. While this works with smaller files, I have two issues when using larger files:
- There can be a significant delay between when I choose the file and when my javascript running check starts returning true. Because of that, it's not clear to the user that something is happening
- I'm getting an error that fileButton.values[0] is undefined in the javascript query, which shouldn't be the case as the reason it is running is because it was triggered on the "change" function of the file button
Really appreciate any help or suggestions. For (1) I was wondering if there's a way to set loading on the button based on an "onclick" event that could be sooner than the "change" but wasn't able to figure out how to do that. For (2) I'm wondering if it is somehow a timing issue and considered introducing a time delay, but that felt pretty inelegant.
Please let me know additional info needed
Thanks!