Title: [Plugin: Custom Upload Dir] Gravity Forms Compatibility
Last modified: August 20, 2016

---

# [Plugin: Custom Upload Dir] Gravity Forms Compatibility

 *  Resolved [landwire](https://wordpress.org/support/users/landwire/)
 * (@landwire)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-custom-upload-dir-gravity-forms-compatibility/)
 * Hi there,
    I would like to get this working with posts that get uploaded through
   gravity forms! At the moment the media files that GF creates are just added to
   the /uploads folder ingnoring all the settings I have made in CUD. It works fine
   for posts from the WP backendn though.
 * Is there anyway that those two plugins can play together?
    Any help is appreciated,
   Sascha
 * [http://wordpress.org/extend/plugins/custom-upload-dir/](http://wordpress.org/extend/plugins/custom-upload-dir/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [landwire](https://wordpress.org/support/users/landwire/)
 * (@landwire)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-custom-upload-dir-gravity-forms-compatibility/#post-2321129)
 * Has anyone got those 2 plugins to work together? That would just be the bees 
   knees….
 *  Thread Starter [landwire](https://wordpress.org/support/users/landwire/)
 * (@landwire)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-custom-upload-dir-gravity-forms-compatibility/#post-2321130)
 * 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](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-custom-upload-dir-gravity-forms-compatibility/#post-2321131)
 * 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](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-custom-upload-dir-gravity-forms-compatibility/#post-2321132)
 * 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](http://wpseek.com/source/wp/latest/nav.html?wp-admin/includes/media.php.html#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.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Custom Upload Dir] Gravity Forms Compatibility’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-upload-dir.svg)
 * [Custom Upload Dir](https://wordpress.org/plugins/custom-upload-dir/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-upload-dir/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-upload-dir/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-upload-dir/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-upload-dir/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-upload-dir/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [ulfben](https://wordpress.org/support/users/ulfben/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-custom-upload-dir-gravity-forms-compatibility/#post-2321132)
 * Status: resolved