You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Dave Briccetti <da...@davebsoft.com> on 2004/04/04 01:43:38 UTC

Providing a vCalendar file via Velocity template: setContentType

My program provides vCalendar files (for import into PIMs and the like),
but I'm unable to set the file extension. 

I have tried 		
	data.setContentType("text/plain");
and
	data.setContentType("x-vCalendar");
and even
	data.setContentType("x-vCalendar; name="event.vcs");

But I can't get the browser's download dialog to show the proposed 
name I want, "event.vcs". I tried naming the Velocity template
event.vcs, but that didn't work. 

I want the smoothest way for the user to fetch the file and import it 
into the PIM.

Thanks.

-- 
Dave Briccetti Software Consulting
http://www.davebsoft.com, (925) 945-7565


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Providing a vCalendar file via Velocity template: setContentType

Posted by Daniel <da...@yorku.ca>.
Hi,

Is this what you're trying to do?

response.setHeader("Content-disposition",
	"attachment; filename=\""+pdfFile+"\"");


Regards,
Daniel

On Sat, 3 Apr 2004, Dave Briccetti wrote:

> My program provides vCalendar files (for import into PIMs and the like),
> but I'm unable to set the file extension.
>
> I have tried
> 	data.setContentType("text/plain");
> and
> 	data.setContentType("x-vCalendar");
> and even
> 	data.setContentType("x-vCalendar; name="event.vcs");
>
> But I can't get the browser's download dialog to show the proposed
> name I want, "event.vcs". I tried naming the Velocity template
> event.vcs, but that didn't work.
>
> I want the smoothest way for the user to fetch the file and import it
> into the PIM.
>
> Thanks.
>
> --
> Dave Briccetti Software Consulting
> http://www.davebsoft.com, (925) 945-7565
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org