plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
426 stars 575 forks source link

Add additional parameters to ContentsUploadModal to be reusable in different scenarios #5881

Closed erral closed 4 weeks ago

erral commented 1 month ago

In a recent project I have found ContentsUploadModal very useful, and I have copied it over to provide the end-user with file upload capabilities.

But as I wanted to restrict its use (max file size, only allow images, ...) and I have seen that react-dropzone's <Dropzone /> allows extra parameters, I have added the option to ContentsUploadModal to pass additional parameters to Dropzone.

This way, one can simply reuse the modal component, which is great.

netlify[bot] commented 1 month ago

Deploy Preview for volto canceled.

Name Link
Latest commit d38b4fdffa881cc73998c00531f6567706056ad4
Latest deploy log https://app.netlify.com/sites/volto/deploys/660853b2d0d3bf000851168c
netlify[bot] commented 1 month ago

Deploy Preview for plone-components canceled.

Name Link
Latest commit d38b4fdffa881cc73998c00531f6567706056ad4
Latest deploy log https://app.netlify.com/sites/plone-components/deploys/660853b268641c0008649937