-
Notifications
You must be signed in to change notification settings - Fork 557
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
Add file input component #2469
Add file input component #2469
Conversation
789eea2
to
72299e3
Compare
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2469 +/- ##
=======================================
Coverage 94.34% 94.35%
=======================================
Files 439 440 +1
Lines 9054 9070 +16
Branches 1391 1398 +7
=======================================
+ Hits 8542 8558 +16
Misses 512 512 ☔ View full report in Codecov by Sentry. |
event.type === UserInputEventType.FileUploadEvent && | ||
event.file !== null | ||
) { | ||
const { files } = (await snap.request({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good argument for letting context be updatable, but context currently has a quite small limit so you wouldn't be able to store large files there anyway
Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
9376e09
to
41426c5
Compare
This adds a new component
FileInput
which can be used to upload files to the Snap. It can be used in forms, and the files are sent to the Snap using a newFileUploadEvent
, as well as a newfiles
property inFormSubmitEvent
.