[Seaside] File downloads etc

Bert Freudenberg bert at impara.de
Tue Jan 10 10:40:16 CET 2006

Am 10.01.2006 um 09:13 schrieb goran at krampe.se:

> Hi guys!
> Ok, this has surely been discussed a *hundred* times - but I just
> started digging into Seaside for real so forgive me. And yes, I did
> search a bit with Google first. :)
> The question is: How do people serve files with Seaside? Especially
> static files like images?

This is the file serving code from SqueakSource:

	document: (self storage loadMonticello: version from: aProject)
	mimeType: 'application/monticello'

loadMonticello: aVersion from: aProject
	| stream |
	stream _ (self projectDirectoryFor: aProject)
		readOnlyFileNamed: aVersion fileName.
	^[ stream binary; contents ]
		ensure: [ stream close ].

I'd really like to have a stream-based solution here, too ...

- Bert -

More information about the Seaside mailing list