[Seaside] download and continue

Carlo snoobabk at yahoo.ie
Wed Jul 27 08:59:46 UTC 2011

My Seaside is rusty but why can't you try:

		html anchor
			document: file contents
				mimeType: file contentType
				fileName: file fileName ;
			callback: [self answer: true];
			text: file fileName.

where file is a WAFile object e.g. 
	 WAFile new
		contents: multiStream contents ;
		fileName: self action , '_RESPONSE.zip' ;
		contentType: 'application/zip'


Message: 1
Date: Tue, 26 Jul 2011 11:15:23 -0700
From: Jon Paynter <kittle31 at gmail.com>
Subject: [Seaside] download and continue
To: seaside at lists.squeakfoundation.org
	<CAPoFHR4fndifRuHBg1a4u4vGN1Yuyjj6vGdru1-Xa39GZYt3WA at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Im trying to setup my application to provide a download link to a generated
file, and then continue with the application flow after the user clicks the
download link.  My application generates a script file, then provides a
download link.  When the user clicks on the download link, it has to record
that the download happened, and then exit the script generation component.

I have the following method:

   self markAsApplied.
   self requestContext respond: [ : response |
       response contentType: 'text/plain';
       attachmentWithFileName: 'EMS.conf';
       nextPutAll: self generatedScript.

Which marks as applied, and causes the browser to download the file. But I
afterwards I need to call: "self answer: true"  so the component will exit.
just adding: "self answer: true" at the end of the method doesnt work.

I found WARequestContext>>respondAndContinue:  but that did not work -- the
block argument is a url instead of the response object

How do I resume processing after doing a download?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110726/67b44e54/attachment-0001.htm


More information about the seaside mailing list