Skip to content
Media CloudDocs
Direct Upload Filters and Actions
On this page

Direct Upload Filters and Actions

Filters

1 min read·5 tags

Filters

media-cloud/direct-uploads/max-uploads

Overrides the setting for the maximum number of uploads.

add_filter('media-cloud/direct-uploads/max-uploads', function($maxUploads) {
    return min(4, $maxUploads);
});

Actions

media-cloud/direct-uploads/process-batch

After files have been uploaded with Direct Upload, this action is called with the attachment IDs so that other tools can process the attachments.

add_action('media-cloud/direct-uploads/process-batch', function($postIds) {
    // Do something with the post IDs.
});

Need a hand with this guide?

Send support the exact step you’re stuck on and we’ll help you finish the setup.

Contact support
Start typing to search the docs

Escto close·⌘Kto open

View all results →