<?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: Attach a file from the Media Library</title>
		<link>https://legacy.forums.gravityhelp.com/topic/attach-a-file-from-the-media-library</link>
		<description>Gravity Support Forums Topic: Attach a file from the Media Library</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 05:19:32 +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/attach-a-file-from-the-media-library" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Attach a file from the Media Library"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/attach-a-file-from-the-media-library#post-153019</link>
			<pubDate>Sat, 23 Feb 2013 09:12:56 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">153019@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I think your path is probably wrong.   Can you use the full path to the file on the server?  I don't think (although I could be wrong) that wp-content is in the root directory of your web server.  It should be a path more like /usr/local/apache/mysite/wordpress/wp-content/ etc.  You are saying that wp-content is at the very root.  I don't think that's correct, but I could be wrong.&#60;/p&#62;
&#60;p&#62;I haven't had a chance to look at that filter in depth, but it's also possible it's looking for a URL, so something more like &#60;a href=&#34;http://www.example.com/wp-content/uploads/2013/02/digital-marketing-checklist-from-pv.pdf&#34; rel=&#34;nofollow&#34;&#62;http://www.example.com/wp-content/uploads/2013/02/digital-marketing-checklist-from-pv.pdf&#60;/a&#62; - can you try that as well?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>danromanchik on "Attach a file from the Media Library"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/attach-a-file-from-the-media-library#post-151765</link>
			<pubDate>Thu, 21 Feb 2013 16:23:27 +0000</pubDate>
			<dc:creator>danromanchik</dc:creator>
			<guid isPermaLink="false">151765@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I've just started using GravityForms, and am puzzled about how to attach a file to a user notification. I've been to the page describing gform_user_notification_attachments, but the example there is for attaching files just uploaded. What I want to do is to attach files that are in the media library. &#60;/p&#62;
&#60;p&#62;I created the following bit of code and inserted it into functions.php:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_user_notification_attachments_1&#38;quot;, &#38;quot;add_attachment&#38;quot;, 10, 3);
function add_attachment($attachments, $lead, $form){
	$attachments = array();
	$attachments[] = &#38;#39;/wp-content/uploads/2013/02/digital-marketing-checklist-from-pv.pdf&#38;#39;;
	return $attachments;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Unfortunately, this isn't doing what I was hoping it would do, i.e. attach this file to the user notification.  Do you have any idea what I'm doing wrong here?&#60;/p&#62;
&#60;p&#62;Also, I'd like to add some logic to download different files based on the value of one of the form fields. Can you give me a hint as to how to do that?&#60;/p&#62;
&#60;p&#62;Thanks, Dan
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
