[rt-users] Trying to get an attachment via command line interface rt show ticket/attachment ...

Jesse Vincent jesse at bestpractical.com
Mon Dec 1 10:59:03 EST 2008




On Sat 29.Nov'08 at  9:58:06 +0100, Tobias Heinz wrote:
> Dear All,
>
> I figured out the solution tonight. The attachment is UTF8 encoded when
> retrieved via rt show. I filtered it through tcs and it works now.
>
>  rt show ticket/59134/attachments/365295/content | tcs -f utf -t 8859-1
>  > $filenameTemp
>
> This gives me the binary file as it is retrieved from the web. There is
> a chance that this depends on the setting of your Postgres (client) and
> / or base operating system ...


This just seems...wrong. Can you tell me a bit more about what the
attachment was in the first place?
>
> Best regards
>
> Tobias Heinz
> http://bayern.zentrumspartei.de
>
> Tobias Heinz schrieb:
>> Dear All,
>>
>> I am trying to retrieve an attachment (application/pdf binary file) from
>> a ticket. I am using the rt command line interface.
>>
>> When opening the attachment from the web the file (PDF) is fine.
>>
>> rt show ticket/59134/attachments/365295/content
>>
>> rt show ticket/59134/attachments/365295/content > /tmp/test.pdf
>>
>> It gives me a file that is approx. 30% larger than the file itself. When
>> looking at the file, the clear-text part appears to be fine. The pdf
>> viewer tells me:
>> "File corrupt" or "graphics can not be rendered".
>>
>> I have transferred the file via scp to a windows machine - same there.
>> Tried to use different pdf viewers on unix - all abended with errors.
>> Clicking the file using Download test.pf on the web rt in ticket 59134
>> frontend gives me a perfect error-free pdf ..
>>
>> Does the cli use any kind of encoding? How can I decode/transform the file?
>>
>> Thanks for any hint  -
>>
>> God bless
>>
>> Tobias Heinz
>>
>>    
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> Community help: http://wiki.bestpractical.com
>> Commercial support: sales at bestpractical.com
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.  
>> Buy a copy at http://rtbook.bestpractical.com
>



> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20081201/f049621b/attachment.sig>


More information about the rt-users mailing list