You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by James Sherwood <js...@romulin.com> on 2004/10/18 14:09:22 UTC

Content type of zip?

Hello,

The file service everyone helped me create is working for every file I have
tested it against except .zip files.

I have tried the setContentType of application/x-zip and application/zip and
neither seem to work.

When I save it and try to open it, it is corrupt.

Any ideas?

Thanks in advance,
James



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


Re: Content type of zip?

Posted by James Sherwood <js...@romulin.com>.
It seems to be working fine now

I rebooted my machine but before I had did that I did a little cleanup and
placed the

cycle.getRequestContext().getResponse().setHeader(
    "Content-Disposition",
    "attachment; filename=")

after the

out.setContentType("application/x-zip");

SO, im not sure if the reboot fixed the problem or the placement of the
sets(although im going with the reboot:)

doing it this way I do not put the extension or it gets
doubled(filename.zip.zip) when setting the filename.  If I put it before the
setcontenttype I do put the extension.

But it seems to work great now so I am not going to test it further.

Thanks for all the help guys!


----- Original Message ----- 
From: "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Monday, October 18, 2004 11:35 AM
Subject: RE: Content type of zip?


> Have you tried setting "application/octet-stream" as the content type?
>
> > -----Original Message-----
> > From: James Sherwood [mailto:jsherwood@romulin.com]
> > Sent: Monday, October 18, 2004 2:09 PM
> > To: Tapestry users
> > Subject: Content type of zip?
> >
> > Hello,
> >
> > The file service everyone helped me create is working for every file I
> > have
> > tested it against except .zip files.
> >
> > I have tried the setContentType of application/x-zip and application/zip
> > and
> > neither seem to work.
> >
> > When I save it and try to open it, it is corrupt.
> >
> > Any ideas?
> >
> > Thanks in advance,
> > James
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>



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


RE: Content type of zip?

Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
Have you tried setting "application/octet-stream" as the content type?

> -----Original Message-----
> From: James Sherwood [mailto:jsherwood@romulin.com]
> Sent: Monday, October 18, 2004 2:09 PM
> To: Tapestry users
> Subject: Content type of zip?
> 
> Hello,
> 
> The file service everyone helped me create is working for every file I
> have
> tested it against except .zip files.
> 
> I have tried the setContentType of application/x-zip and application/zip
> and
> neither seem to work.
> 
> When I save it and try to open it, it is corrupt.
> 
> Any ideas?
> 
> Thanks in advance,
> James
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org




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