[Seaside] How to allow downloads in Seaside?

Boris Popov boris at deepcovelabs.com
Fri Aug 10 23:37:45 UTC 2007


Then you would just pass byte array to #downloadBytes, say

self
 downloadBytes: 'c:\play.wav' asFilename contentsOfEntireBinaryFile
    mime: 'audio/x-wav'
    filename: 'play.wav'];
 with: 'Download WAV File!'.

It all depends on what it is you are trying to achieve I guess.

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

boris at deepcovelabs.com

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you. 
________________________________________
From: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Ching de la Serna
Sent: Friday, August 10, 2007 4:34 PM
To: Seaside - general discussion
Subject: Re: [Seaside] How to allow downloads in Seaside?

Thanks Boris. 
On 8/11/07, Boris Popov <boris at deepcovelabs.com> wrote:
Sigh, obviously anchor would need to be closed,

html anchor
  callback: [self
              downloadBytes: self asCSV

could you show me sample code on #asCSV? I am thinking of music files to be downloaded. 

              mime: 'text/csv'
              filename: 'export.csv '];
  with: 'Export'.

Cheers,

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4 

boris at deepcovelabs.com

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is 
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

> -----Original Message-----
> From: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-
> bounces at lists.squeakfoundation.org ] On Behalf Of Boris Popov
> Sent: Friday, August 10, 2007 3:56 PM
> To: Seaside - general discussion
> Subject: RE: [Seaside] How to allow downloads in Seaside?
>
> I use the following extension on WAComponent, 
>
> downloadBytes: bytes mime: mime filename: filename
>  ^self session returnResponse: (WADocumentHandler
>                                   document: bytes
>                                   mimeType: mime 
>                                   fileName: filename) response
>
> which is then called from a callback, say
>
> html anchor
>   callback: [self
>               downloadBytes: self asCSV 
>               mime: 'text/csv'
>               filename: 'export.csv'].
>
> Hope this helps,
>
> Cheers!
>
> -Boris
>
> --
> +1.604.689.0322 
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
> http://tinyurl.com/r7uw4
>
> boris at deepcovelabs.com
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the message
> header. Unless otherwise indicated, it contains information that is 
> private and confidential. If you have received it in error, please
> notify the sender and delete the entire message including any
> attachments.
>
> Thank you.
>
> > -----Original Message----- 
> > From: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-
> > bounces at lists.squeakfoundation.org] On Behalf Of Ching de la Serna
> > Sent: Friday, August 10, 2007 3:23 PM
> > To: Seaside at lists.squeakfoundation.org 
> > Subject: [Seaside] How to allow downloads in Seaside?
> >
> > Hi,
> >
> > If I were to allow downloads from my webpage, how would I go about
it?
> > Does Seaside have a method for doing this? Many thanks. 
> >
> > Ching
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org 
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
Seaside mailing list 
Seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside 



More information about the seaside mailing list