[OpenLayers-Users] Requesting zip data using OpenLayers.Request.GET. bug ?

Kwong Hu Kiu kwonghu at hotmail.com
Thu May 7 09:00:35 EDT 2009




How am I crossposting ? 
I thought this 'might' be a bug. That's why i sent it to the dev list.
Is this wrong ?

Anyway... 

No, you don't understand my question.
Once users clicked on a button called 'Download zip'. 
The wms-server will send a respond together with a zip file. 
I thought this will work if Openlayers.Request is behaving the same way as requesting from the browser.

> Date: Thu, 7 May 2009 08:46:46 -0400
> To: kwonghu at hotmail.com
> CC: users at openlayers.org
> Subject: Re: [OpenLayers-Users] Requesting zip data using OpenLayers.Request.GET. bug ?
> From: crschmidt at metacarta.com
> 
> On Thu, May 07, 2009 at 08:28:31PM +0800, Kwong Hu Kiu wrote:
> 
> This question is more appropriate for the users list. Please do *not*
> crosspost to both lists.
> 
> > Hi,
> > 
> > I am using OpenLayers.Request.GET to request a zip archive that I have generated on the server side.
> > 
> > OpenLayers.Request.GET is working well. I can receive the request parameters on the server-side.
> > 
> > These parameters are used by my wms service to return a zip archive with bitmap data zipped inside.
> > 
> > But for some reasons when I send the zip file from the server to browser,
> > It's not opening a download dialog like I expected that let users to download the zip file.
> > 
> > Instead, nothing is happening on the browser side(no javascript error) but i know the bitmap data and zip archive is being created and passed onto the browser through debugging.
> > 
> > Strangely,
> > 
> > If I request from the browser by typing the url, it works.
> > eg. http://localhost/wms.aspx?REQUEST=downloadZiparchive.
> > 
> > I am wondering if this is a bug or I am not using it correctly ?
> 
> Expecting that an XMLHttpRequest will trigger a file download is your
> mistake. If you want users browsers to download something, then send
> them to that ocation -- either by giving them a link to click, or by
> setting document.location. 
> 
> > Need to solve this asap.
> > 
> > Thanks.
> > 
> > 
> > 
> > 
> 
> > _______________________________________________
> > Dev mailing list
> > Dev at openlayers.org
> > http://openlayers.org/mailman/listinfo/dev
> 
> 
> -- 
> Christopher Schmidt
> MetaCarta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090507/efaf611e/attachment.html


More information about the Users mailing list