-
Notifications
You must be signed in to change notification settings - Fork 103
Description
As part of implementing the File Upload component in patternfly/patternfly-react#3865, I was asked how it could be used to upload a non-text file (specifically, a zip file). Since the component includes a textarea for the file contents, the only solution currently is to hide the textarea and provide no preview or summary for an uploaded non-text file, or to have the consumer implement their own custom preview or summary.
Initially I implemented a generic summary for non-text files that could be used by default, but I removed it before merging that PR so we could revisit its design and core implementation first. This is what my initial version looked like:
Basically, the idea is to show something useful based on only the data we know about a selected file before reading it: filename, type, size, and last modified date/time.
