Skip to content
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

File Upload: Add preview/summary for non-text files #826

mturley opened this issue Mar 9, 2020 · 1 comment

File Upload: Add preview/summary for non-text files #826

mturley opened this issue Mar 9, 2020 · 1 comment


Copy link

@mturley mturley commented Mar 9, 2020

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:

Screenshot 2020-03-09 14 10 09

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.

cc @mcarrano @christiemolloy


This comment has been minimized.

Copy link

@mcarrano mcarrano commented Mar 9, 2020

Thanks @mturley . I am going to transfer this to patternfly-design for further consideration.

@mcarrano mcarrano transferred this issue from patternfly/patternfly Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.