Download option in ticket history

Hi all

Just start out by saying excellent product. Used RT1
for a long time, RT2 is even better.

However, I noticed something that kinda got me a bit.

When viewing a ticket history, attachments can be
"downloaded" from the web interface. However, on my
browser (IE6) rather than save to disk, it attempts
to open it in the browser window (we mainly get pdf
and doc files).

I’d rather it opened the “save as” dialogue and saved
to disk.

To do this I hacked…

WebRT/html/Ticket/Attachment/dhandler

and this was the change I made

 #SetContentType($content_type);
 SetContentType("application/force-download\nContent-disposition:

attachment\nContent-type: $content_type");

Now, I’m no real perl hacker and I know that that code up there is well
ugly but it works for me and my horid IE. I’m sure there’s a better
(proper?) way to do this that could make it into some future version?
(oh, btw, I’m running 2.0.15)

Just thought I mention it. Keep up the good work!

cheers
Andy

Why not add another link instead of re-defining the current one?

I.E.

Attachment–(View)(Download)

Thanks,

Joshua–On Thursday, March 20, 2003 04:59:01 PM +0000 Andy Kirkham andy@synergynewmedia.co.uk wrote:

Hi all

Just start out by saying excellent product. Used RT1
for a long time, RT2 is even better.

However, I noticed something that kinda got me a bit.

When viewing a ticket history, attachments can be
"downloaded" from the web interface. However, on my
browser (IE6) rather than save to disk, it attempts
to open it in the browser window (we mainly get pdf
and doc files).

I’d rather it opened the “save as” dialogue and saved
to disk.

To do this I hacked…

WebRT/html/Ticket/Attachment/dhandler

and this was the change I made

 #SetContentType($content_type);
 SetContentType("application/force-download\nContent-disposition:

attachment\nContent-type: $content_type");

Now, I’m no real perl hacker and I know that that code up there is well
ugly but it works for me and my horid IE. I’m sure there’s a better
(proper?) way to do this that could make it into some future version?
(oh, btw, I’m running 2.0.15)

Just thought I mention it. Keep up the good work!

cheers
Andy


rt-devel mailing list
rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel

Hi,

I’d rather it opened the “save as” dialogue and saved

to disk.

Or just right-click and “Save as …”

Martin