[Seaside] File Open / Save -> File Upload / Download?

Philippe Marschall philippe.marschall at gmail.com
Sun Jan 27 14:04:36 UTC 2008


2008/1/27, itsme213 <itsme213 at hotmail.com>:
> Part of my app is an editor for some business objects. Eventually these
> might be saved in a server-side repository, but for now the user saves file
> on local filesystem.
>
> I am thinking of doing:
> - For "File-Open" (to build initial biz object in my app)
>    - use something like in WAUploadTest
>         html fileUpload callback: [ :file | ...]
>
> - For "File-Save" (to save biz objects at end of user session)
>    - any reasonable option here? anything like
>         html fileDownload ...

html anchor
    callback: [
        self session returnResponse: (WARespnse new
            contentType: "the content type";
            attachmentWithFileName: "the file name";
            nextPutAll: "your content";
            yourself) ];
    with: 'download'

An other option would be (from WAUploadTest):

		html anchor
			document: file contents
			mimeType: file contentType
			fileName: file fileName;
			with: file fileName , ' (' , file contentType toString , ')'.

Cheers
Philippe


> Thanks - Sophie
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the seaside mailing list