I would like to change the upload directory for PDF files only, not for other files. For example, the PDF files would be uploaded to wp-content/uploads/pdf
but other files would remain in wp-content/uploads/yyyy/mm
.
I know it possible to filter upload_dir
but I don’t know how to do it with file types/mimes.
Thanks!
Following Justice Is Cheap lead, I ended adapting the functions from this plugin: http://wordpress.org/extend/plugins/custom-upload-dir/
you can change upload directory from wp-config.php file in wordpress.
define(‘UPLOADS’, ‘myimages’);
Make sure you add this code before the line:
require_once(ABSPATH.âwp-settings.phpâ);
this is allows you to upload media in myimages folder instead of wp-content/uploads
Thanks