Main Menu
Sub Menu

wpdm_before_upload_file – Action triggers before uploading a file


This hook is triggered immediately before uploading a file.


One parameter/argument is passed to this hook.


   add_action("wpdm_before_upload_file", "callack_function",10,1);


add_action("wpdm_before_upload_file", "block_file_type", 10, 1); 
function block_file_type($FILE)
        $ext = explode('.', $FILES['name']);         
        $ext = end($ext);         
        $ext = strtolower($ext);
        if($ext == 'xml') die('-3'); 
        //if you want to block xml file upload 


Last updated on Dec 7, 2020

Need More Clarification?

For any technical issue, if you are already using pro version please post in pro forum and free version users please post in free forum. Otherwise, if you have any pre-sale or order related query please contact live chat support team. For technical support.

Need Customization?

If you need additional customization on WordPress Download Manager or any type of custom support on WordPress you may contact our customization service.