[Seaside] download and continue
Jon Paynter
kittle31 at gmail.com
Tue Jul 26 18:15:23 UTC 2011
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:
downloadScript
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.htm
More information about the seaside
mailing list