Closed
Description
A proposal to update the uploadMedia
method and allow limiting uploads to a single file. When filesList
exceeds the set limit, the function will call an onError
callback and exit early.
Why?
The mediaUpload
setting, which utilizes this method, is often used with the DropZone
component. This component allows any number of files, but consumers only see and use the first file.
Currently, restrictions need to be set on the consumer level. Examples:
Proposal
Introduce a new boolean multiple
boolean argument for uploadMedia
and mediaUpload
methods. The multiple
also matches the prop used by the MediaUpload
component.
cc @swissspidy, @t-hamano