How to set file type in wp_handle_upload?

Got it, looking at the source code I came up with this:

wp_handle_upload($file_input, array('test_form' => false, 'mimes' => array('csv' => 'text/csv')));

To override the mime types just pass mimes as an array wit the key being the file extension and the value as the mime type.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)