-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Penumbra Form File Input Support #230
Labels
enhancement
New feature or request
Comments
We could definitely auto detect and convert the File format to improve the developer experience here. Stay tuned for changes soon! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was slightly surprised that penumbra did not work out of the box with an HTML file input field:
This would error out with the following:
I was finally able to get this working by extracting the arrayBuffer content of the file and putting it into a Response.
I might just be a newbie as I have no experience with streams in javascript, but I felt this could have been more intuitive. It would be helpful for either documentation to be added to help others implement this without digging through everything or for penumbra to work natively with the File object natively. At first glance, it would seem that a File has a stream and a size property and it should be compatible but it, unfortunately, is not.
Again, excuse my ignorance if this is something well known for those familiar with working with Files and streams. It was the first time I dealt with it, and I was surprised it took so long for me to figure everything out.
Am I using it improperly? Is there a more straightforward way to take a file from a File Input element?
Thank you for your consideration.
The text was updated successfully, but these errors were encountered: