Has anyone got those 2 plugins to work together? That would just be the bees knees….
After many hours I got the two to play. It’s a minor hack for now and reapplied at each update in a few minutes. I hope to get it sorted without hack sooner or later…
Plugin Author
ulfben
(@ulfben)
When using some other upload method (than the WordPress media library or admin backend), you must provide:
$_REQUEST['Upload'] or $_REQUEST['html-upload'] (any non-empty value)
And – if you want to support all of CUDs post-specific placeholders – provide:
global $post
global $post_id
or $_REQUEST['post_id']
The values are used in that priority.
And lastly – Custom Upload Dir only applies if your upload function runs the upload_dir-filter.
Plugin Author
ulfben
(@ulfben)
The new drag-n-drop uploader of WordPress 3.3 changed all this, as it provides neither of those flags (Upload / html-upload).
With CUD 3.3 there is no checking for these. Instead the filter only registers to run while media_handle_upload is executing. media_handle_upload is a built-in WordPress function and handles the file upload POST itself, creating the attachment post.
Thus; when using custom upload methods, make sure they put the files through that function or CUD will have no effect.