Thanks Tom - but actually my custom field IS defined as "Upload one file" (or an attachment).
My problem is saving that attachment from RT to /tmp (for manipulation from command-line script). There must be some non-http method of extracting the attachment to a file? -----Original Message----- From: Tom Lahti <[email protected]> To: BJ Blanchard <[email protected]> Cc: [email protected] Subject: Re: [rt-users] Storing custom field file to local file system Date: Tue, 02 Jun 2009 13:42:07 -0700 > my $url = RT->Config->Get('WebPath') . > "/Download/CustomFieldValue/".$cf->Id.'/'.$cf->Content; > getstore($url,"/tmp/temp.odt"); > > Or perhaps more easily put: How do you extract a file from a custom > field and store it on the local file system? Since the custom field just names the file, set up a separate name space in your web server (Apache?) that doesn't go through RT to fetch the document through with getstore(). my $url = "http://not-rt.server.com/some/dir/" . $cf->Content; getstore($url...); If you need to secure it better make sure not-rt.server.com isn't publicly available, or use "localhost" and clamp that down in Apache config, or whatever. If you need RT to authenticate document access, then you're better off storing the document as an attachment.
_______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [email protected] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
