Thanks Chris, I will give that a shot, it's not ideal because it would still bake the URL into the file upload reference so testing uploads on a dev environment would cause the wrong URL to be linked on the live environment.
Just to be clear also, it's actually not the root relative urls plugin at all, but the
define('WP_CONTENT_URL', '/wp-content');
in the functions.php that is causing GF to not absolutely link the URL's correctly (in email only, relative reference is fine in the backend for file downloads). Most users don't touch it, but some may want to redefine the location of that folder to name it simply "content" or "_web_contents" (to put it at the top of directory in sort by name) using that WP_CONTENT_URL constant. It seems that GF should account for this in how it creates the links for the email notifications to handle these standard WP config settings.
I even tried a plugin that pushes all files uploaded through WP media uploads to Amazon S3 and those all work correctly, but not GF uploads; so I presume GF uploads are handled differently than the default WP upload methodology.
Is there no other way to manipulate the email messages sent by GF than hack at core files? (it would be much easier to edit the message output than modify and deal with absolute URL's and adding pre-submission filters to each file upload field.) Plus this would keep things more server agnostic.
Thanks for all your help!
Cameron
P.S. if I were to take the time to figure out how to setup the url replacements in a WP and GF friendly fashion would you consider reviewing the code for potential future use? I'm sure others would see benefit from this as well.
Posted 11 years ago on Monday January 7, 2013 |
Permalink