File tree Expand file tree Collapse file tree
src/components/mui/formik-inputs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,15 +27,16 @@ const MuiFormikUpload = ({
2727 id,
2828 name,
2929 onDelete,
30- maxFiles = MAX_INVENTORY_IMAGES_UPLOAD_QTY
30+ maxFiles = MAX_INVENTORY_IMAGES_UPLOAD_QTY ,
31+ allowedExtensions
3132} ) => {
3233 const [ field , meta , helpers ] = useField ( name ) ;
3334
3435 const mediaType = {
3536 max_size : MAX_INVENTORY_IMAGE_UPLOAD_SIZE ,
3637 max_uploads_qty : maxFiles ,
3738 type : {
38- allowed_extensions : ALLOWED_INVENTORY_IMAGE_FORMATS
39+ allowed_extensions : allowedExtensions || ALLOWED_INVENTORY_IMAGE_FORMATS
3940 }
4041 } ;
4142
@@ -108,7 +109,8 @@ MuiFormikUpload.propTypes = {
108109 id : PropTypes . string ,
109110 name : PropTypes . string . isRequired ,
110111 onDelete : PropTypes . func ,
111- maxFiles : PropTypes . number
112+ maxFiles : PropTypes . number ,
113+ allowedExtensions : PropTypes . arrayOf ( PropTypes . string )
112114} ;
113115
114116export default MuiFormikUpload ;
You can’t perform that action at this time.
0 commit comments