Open mabashian opened 4 years ago
Since https://github.com/ansible/awx/pull/7960 was merged this issue is no longer blocked.
@nixocio you still working on this one?
A few notes to be explore by the person working on this issue.
react-dropzone
. See: https://www.patternfly.org/v4/components/file-upload/react/#restricting-file-size-and-typeWe can add new prop dropzoneProps
to FileUpload
inside CredentialInput
.
dropzoneProps={{
maxSize: 512,
onDropRejected: handleIsRejected,
}}
We will need to address how handleIsRejected
sets /passes the error from the CredentialInput
to CredentialField
.
@nixocio you still working on this one?
I unassigned myself from this issue for the time being.
ISSUE TYPE
SUMMARY
https://github.com/ansible/awx/pull/7960 will add the ability to upload key files to some credential form fields. Right now there is no upper limit on the size of the upload which can cause the UI to freeze if the file is quite large. The files uploaded to this form should be quite small. If we select a sufficiently large upper limit I would hope that users would not run in to it for legitimate uploads.
Here are the dropzone props: https://react-dropzone.js.org/#!/Dropzone
Here's are the PF component props: http://patternfly-react.surge.sh/documentation/react/components/fileupload#props
In this case we'd want to add
dropzoneProps
as a prop on the PF component and include themaxSize
argument.Marking this as blocked until #7960 merges.