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.<br>
<br>I have the following method:<br><br>downloadScript<br> self markAsApplied.<br> self requestContext respond: [ : response |<br> response contentType: 'text/plain';<br> attachmentWithFileName: 'EMS.conf';<br>
nextPutAll: self generatedScript.<br> ].<br><br>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.<br>
just adding: "self answer: true" at the end of the method doesnt work.<br><br>I found WARequestContext>>respondAndContinue: but that did not work -- the block argument is a url instead of the response object<br>
<br>How do I resume processing after doing a download?<br>