Closed sloshy closed 8 months ago
Hey @sloshy!
Thanks for reporting. I'll always welcome a contribution if you'd like to! :grin:
Otherwise, I think I'm building up a few issues on Tyrian that need attention, so I expect I'll get around to this and other issues in the not to distant future.
I believe I've coincidentally fixed this in this PR: https://github.com/PurpleKingdomGames/tyrian/pull/239
Merged, will be fixed in the next release.
Thanks a bunch @davesmith00000! I never did get around to working on this but I greatly appreciate the fix!
Was implementing a file upload functionality for a web app I'm working on in Tyrian, and thought I'd use the
FileReader.readText
built-in to read the file. This did not work exactly as I expected because my code after the upload was failing to parse the file. It seems that the implementation has some code-reuse by using the browser built-inFileReader#readAsDataUrl
, which returns a URL suitable for linking or including as part of a web page but not for parsing.This would be fine for that use case but I expected the behavior to be more like
FileReader#readAsText
which returns the raw text of the file. I implemented a helper that does something similar in my own program for reference:Would be happy to contribute for this issue