<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Custom Upload Directory plugin and GF</title>
		<link>https://legacy.forums.gravityhelp.com/topic/custom-upload-directory-plugin-and-gf</link>
		<description>Gravity Support Forums Topic: Custom Upload Directory plugin and GF</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 13:19:00 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/custom-upload-directory-plugin-and-gf" rel="self" type="application/rss+xml" />

		<item>
			<title>sascha on "Custom Upload Directory plugin and GF"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-upload-directory-plugin-and-gf#post-43158</link>
			<pubDate>Mon, 05 Dec 2011 16:58:36 +0000</pubDate>
			<dc:creator>sascha</dc:creator>
			<guid isPermaLink="false">43158@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ok, I got a reply from the author of CUD. Not sure if those requirements can be met with a hook/filter in GF? I would value your opinion on that....&#60;/p&#62;
&#60;p&#62;&#34;Yeah, I just realized we don't need any special flag at all. They just need to provide&#60;/p&#62;
&#60;p&#62;$_REQUEST['Upload'] or $_REQUEST['html-upload']&#60;/p&#62;
&#60;p&#62;and either:&#60;br /&#62;
global $post&#60;br /&#62;
global $post_id&#60;br /&#62;
or $_REQUEST['post_id']&#34;&#60;/p&#62;
&#60;p&#62;Would that make sense to integrate into GF?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sascha on "Custom Upload Directory plugin and GF"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-upload-directory-plugin-and-gf#post-43114</link>
			<pubDate>Mon, 05 Dec 2011 09:42:02 +0000</pubDate>
			<dc:creator>sascha</dc:creator>
			<guid isPermaLink="false">43114@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi again,&#60;br /&#62;
the post_id (as a global?!?) is actually enough. I need to pass that on to CUD and tell CUD that the request came from GF.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sascha on "Custom Upload Directory plugin and GF"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-upload-directory-plugin-and-gf#post-43110</link>
			<pubDate>Mon, 05 Dec 2011 07:42:47 +0000</pubDate>
			<dc:creator>sascha</dc:creator>
			<guid isPermaLink="false">43110@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi there,&#60;br /&#62;
made good progress! Tracked it down to the following GF function:&#60;/p&#62;
&#60;p&#62;private static function copy_post_image($url) in forms_model.php&#60;/p&#62;
&#60;p&#62;1. How can I make the (just created) post information available during that function? I need the author, category, post type, post id. When I var_dump ($post) I get NULL.... I guess if I have the post ID I can get all the information by adding a get_post to the copy_post_image($url) function.&#60;/p&#62;
&#60;p&#62;2. If that is not possible: can I get any $entry information at this stage?&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sascha on "Custom Upload Directory plugin and GF"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-upload-directory-plugin-and-gf#post-43107</link>
			<pubDate>Mon, 05 Dec 2011 04:37:45 +0000</pubDate>
			<dc:creator>sascha</dc:creator>
			<guid isPermaLink="false">43107@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi again,&#60;br /&#62;
looked at the official function reference for &#34;wp_insert_attachment&#34; referenced above. It basically inserts a file from the &#34;uploads directory&#34;. The problem is that GF bypasses the uploads directory modified by CUD, but uses only the one given in the WP media settings instead.&#60;/p&#62;
&#60;p&#62;So the questin really is:&#60;br /&#62;
How does GF get that file to the uploads directory and where does it get the uploads directory path from? Which functions/code does it use to do that? Where is it in the code of GF?&#60;br /&#62;
That might help me figure out why it bypasses CUD....&#60;br /&#62;
Grateful for any help with this!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sascha on "Custom Upload Directory plugin and GF"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-upload-directory-plugin-and-gf#post-43106</link>
			<pubDate>Mon, 05 Dec 2011 04:17:02 +0000</pubDate>
			<dc:creator>sascha</dc:creator>
			<guid isPermaLink="false">43106@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi at GF,&#60;br /&#62;
I'm back on this issue again and banging my head. Could you let me know where in the GF code exactly the attachment is uploaded to the directory, basically where the above functions are called? And also if the post is created before the attachment is uploaded or after? Maybe that will give me a hint on why the following filter gets bypassed:&#60;br /&#62;
add_filter('upload_dir', 'cud_custom_upload_dir');&#60;/p&#62;
&#60;p&#62;A whole walkthrough of the process of creating a post and uploading an attachment in GF would be great and hopefully together with the CUD developer we can get this issue sorted!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Custom Upload Directory plugin and GF"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-upload-directory-plugin-and-gf#post-36723</link>
			<pubDate>Fri, 30 Sep 2011 13:49:56 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">36723@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Gravity Forms uses the functions I referenced above to add the image to the media library.  So those are the functions that are used to handle media library attachment and processing.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sascha on "Custom Upload Directory plugin and GF"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-upload-directory-plugin-and-gf#post-36686</link>
			<pubDate>Fri, 30 Sep 2011 08:27:46 +0000</pubDate>
			<dc:creator>sascha</dc:creator>
			<guid isPermaLink="false">36686@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Carl or anyone,&#60;br /&#62;
my head is buzzing. No idea why the filter is being bypassed. The filter is in the wp_upload_dir() function (functions.php in wp-includes) which GF uses as well. Any idea why it's not being recognized? I'm not sure how WP processes filters.....
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Custom Upload Directory plugin and GF"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-upload-directory-plugin-and-gf#post-36498</link>
			<pubDate>Wed, 28 Sep 2011 16:26:43 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">36498@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The functions we use are:&#60;/p&#62;
&#60;p&#62;wp_insert_attachment()&#60;br /&#62;
wp_update_attachment_metadata()&#60;br /&#62;
wp_generate_attachment_metadata()&#60;/p&#62;
&#60;p&#62;The first one inserts the attachment into the Media Library.  The 2nd and 3rd function calls above are used together to then create the image sizes, etc.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sascha on "Custom Upload Directory plugin and GF"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-upload-directory-plugin-and-gf#post-36495</link>
			<pubDate>Wed, 28 Sep 2011 16:11:04 +0000</pubDate>
			<dc:creator>sascha</dc:creator>
			<guid isPermaLink="false">36495@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks. I have contacted him. We will see what he says....&#60;br /&#62;
Can you let me know which WP function and when GF is calling when you submit a form that sends a post submission? Maybe I can have a look myself why the CUD settings are being bypassed. Might just need another add_filter/apply_filter somewhere else to make this work.&#60;br /&#62;
It would be great if you could point me to the right files &#38;amp; functions for both GF and WP.&#60;br /&#62;
Maybe it also has to do with the order that GF calls the WP functions?&#60;br /&#62;
Anyway, any pointers to the right files would be appriciated in case I do not hear from the CUD developer.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Custom Upload Directory plugin and GF"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-upload-directory-plugin-and-gf#post-36471</link>
			<pubDate>Wed, 28 Sep 2011 14:39:34 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">36471@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Gravity Forms uses built in WordPress functions to add the image to the Media Library and then WordPress processes the image and moves it where it needs to go.  Gravity Forms itself doesn't handle this, it calls a WordPress function to do this.  Most likely the CUD plugin is applying hooks to to do what it does in such a way that it isn't applied to this function.  You may need to discuss this with the CUD plugin developer.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
