[Seaside] Serving files from within Seaside

Diego Lont diego.lont at delware.nl
Tue Dec 18 12:07:55 UTC 2012


And looking at my own code, you probably want this hint too:

the document you pass to the response should be a WAMimeDocument, best created with:
	on: <documentdata>
	mimeType: WAMimeType main: <…> sub: <…>
	fileName: <the default name the client can save this>

On Dec 18, 2012, at 8:53 AM, jtuchel wrote:

> Hi there,
> 
> I know people consider serving files a job that should be handled by a
> "real" http server rather than Seaside. In most cases, esp. for static
> resources that can be accessed by the public, that is absolutely the case.
> 
> But I need to serve files in a callback. The files are being partly
> calculated and read from a DB and should be available for download by
> clicking on a link.
> 
> I've been looking into WAFileLibrary and WAFileHandler, but am not sure
> where to start.
> 
> What I want to do is something like:
> 
> html anchor
>  callback: [self calculateChartAndServeIt]
>  with: 'Download full chart'.
> 
> I know I will have to respond:, but can I do that in a callback?
> 
> Joachim
> 
> 
> 
> 
> --
> View this message in context: http://forum.world.st/Serving-files-from-within-Seaside-tp4659745.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list