<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Re: [Seaside] How to allow downloads in Seaside?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>The protocol is likely to be on a filename class not bytearray, but I don't squeak, so...<BR>
<BR>
Cheers!<BR>
<BR>
-Boris<BR>
(Sent from a BlackBerry)<BR>
<BR>
----- Original Message -----<BR>
From: seaside-bounces@lists.squeakfoundation.org <seaside-bounces@lists.squeakfoundation.org><BR>
To: Seaside - general discussion <seaside@lists.squeakfoundation.org><BR>
Sent: Fri Aug 10 16:59:30 2007<BR>
Subject: Re: [Seaside] How to allow downloads in Seaside?<BR>
<BR>
Thanks again, Boris. I am using Squeak. I suppose there is an equivalent method? I am looking at ByteArray in Squeak and I do not see a method similar in name to #contentsOfEntireBinaryFile.<BR>
<BR>
<BR>
On 8/11/07, Boris Popov <boris@deepcovelabs.com> wrote:<BR>
<BR>
Its a standard method in visualworks to read entire file into a byte array.<BR>
<BR>
Cheers!<BR>
<BR>
-Boris<BR>
(Sent from a BlackBerry)<BR>
<BR>
----- Original Message -----<BR>
From: seaside-bounces@lists.squeakfoundation.org < seaside-bounces@lists.squeakfoundation.org <<A HREF="mailto:seaside-bounces@lists.squeakfoundation.org">mailto:seaside-bounces@lists.squeakfoundation.org</A>> ><BR>
To: Seaside - general discussion <seaside@lists.squeakfoundation.org><BR>
Sent: Fri Aug 10 16:50:51 2007<BR>
Subject: Re: [Seaside] How to allow downloads in Seaside?<BR>
<BR>
Thanks again, Boris.<BR>
<BR>
<BR>
On 8/11/07, Boris Popov <boris@deepcovelabs.com> wrote:<BR>
<BR>
Then you would just pass byte array to #downloadBytes, say<BR>
<BR>
self<BR>
downloadBytes: 'c:\play.wav' asFilename contentsOfEntireBinaryFile<BR>
<BR>
<BR>
how would #contentsOfEntireBinaryFile be implemented? That is if I intend to allow the download of an entire audio file that is in my server?.<BR>
<BR>
<BR>
<BR>
mime: 'audio/x-wav'<BR>
filename: 'play.wav'];<BR>
with: 'Download WAV File!'.<BR>
<BR>
It all depends on what it is you are trying to achieve I guess.<BR>
<BR>
-Boris<BR>
<BR>
--<BR>
+1.604.689.0322<BR>
DeepCove Labs Ltd.<BR>
4th floor 595 Howe Street<BR>
Vancouver, Canada V6C 2T5<BR>
<A HREF="http://tinyurl.com/r7uw4">http://tinyurl.com/r7uw4</A> < <A HREF="http://tinyurl.com/r7uw4">http://tinyurl.com/r7uw4</A> <<A HREF="http://tinyurl.com/r7uw4">http://tinyurl.com/r7uw4</A>> ><BR>
<BR>
<BR>
boris@deepcovelabs.com<BR>
<BR>
CONFIDENTIALITY NOTICE<BR>
<BR>
This email is intended only for the persons named in the message<BR>
header. Unless otherwise indicated, it contains information that is<BR>
private and confidential. If you have received it in error, please<BR>
notify the sender and delete the entire message including any<BR>
attachments.<BR>
<BR>
Thank you.<BR>
________________________________________<BR>
From: seaside-bounces@lists.squeakfoundation.org [ <A HREF="mailto:seaside-bounces@lists.squeakfoundation.org">mailto:seaside-bounces@lists.squeakfoundation.org</A> <<A HREF="mailto:seaside-bounces@lists.squeakfoundation.org">mailto:seaside-bounces@lists.squeakfoundation.org</A>> ] On Behalf Of Ching de la Serna<BR>
Sent: Friday, August 10, 2007 4:34 PM<BR>
To: Seaside - general discussion<BR>
Subject: Re: [Seaside] How to allow downloads in Seaside?<BR>
<BR>
Thanks Boris.<BR>
On 8/11/07, Boris Popov < boris@deepcovelabs.com> wrote:<BR>
Sigh, obviously anchor would need to be closed,<BR>
<BR>
html anchor<BR>
callback: [self<BR>
downloadBytes: self asCSV<BR>
<BR>
could you show me sample code on #asCSV? I am thinking of music files to be downloaded.<BR>
<BR>
mime: 'text/csv'<BR>
filename: 'export.csv '];<BR>
with: 'Export'.<BR>
<BR>
Cheers,<BR>
<BR>
-Boris<BR>
<BR>
--<BR>
+1.604.689.0322<BR>
DeepCove Labs Ltd.<BR>
4th floor 595 Howe Street<BR>
Vancouver, Canada V6C 2T5<BR>
<A HREF="http://tinyurl.com/r7uw4">http://tinyurl.com/r7uw4</A><BR>
<BR>
boris@deepcovelabs.com<BR>
<BR>
CONFIDENTIALITY NOTICE<BR>
<BR>
This email is intended only for the persons named in the message<BR>
header. Unless otherwise indicated, it contains information that is<BR>
private and confidential. If you have received it in error, please<BR>
notify the sender and delete the entire message including any<BR>
attachments.<BR>
<BR>
Thank you.<BR>
<BR>
> -----Original Message-----<BR>
<BR>
> From: seaside-bounces@lists.squeakfoundation.org [ <A HREF="mailto:seaside-">mailto:seaside-</A> <<A HREF="mailto:seaside-">mailto:seaside-</A>> <<A HREF="mailto:seaside-">mailto:seaside-</A>><BR>
> bounces@lists.squeakfoundation.org ] On Behalf Of Boris Popov<BR>
> Sent: Friday, August 10, 2007 3:56 PM<BR>
> To: Seaside - general discussion<BR>
> Subject: RE: [Seaside] How to allow downloads in Seaside?<BR>
><BR>
> I use the following extension on WAComponent,<BR>
><BR>
> downloadBytes: bytes mime: mime filename: filename<BR>
>^self session returnResponse: (WADocumentHandler<BR>
> document: bytes<BR>
> mimeType: mime<BR>
> fileName: filename) response<BR>
><BR>
> which is then called from a callback, say<BR>
><BR>
> html anchor<BR>
> callback: [self<BR>
> downloadBytes: self asCSV<BR>
> mime: 'text/csv'<BR>
> filename: 'export.csv'].<BR>
><BR>
> Hope this helps,<BR>
><BR>
> Cheers!<BR>
><BR>
> -Boris<BR>
><BR>
> --<BR>
> +1.604.689.0322<BR>
> DeepCove Labs Ltd.<BR>
> 4th floor 595 Howe Street<BR>
> Vancouver, Canada V6C 2T5<BR>
> <A HREF="http://tinyurl.com/r7uw4">http://tinyurl.com/r7uw4</A><BR>
><BR>
> boris@deepcovelabs.com<BR>
><BR>
> CONFIDENTIALITY NOTICE<BR>
><BR>
> This email is intended only for the persons named in the message<BR>
> header. Unless otherwise indicated, it contains information that is<BR>
> private and confidential. If you have received it in error, please<BR>
> notify the sender and delete the entire message including any<BR>
> attachments.<BR>
><BR>
> Thank you.<BR>
><BR>
> > -----Original Message-----<BR>
<BR>
> > From: seaside-bounces@lists.squeakfoundation.org < <A HREF="mailto:seaside-bounces@lists.squeakfoundation.org">mailto:seaside-bounces@lists.squeakfoundation.org</A> <<A HREF="mailto:seaside-bounces@lists.squeakfoundation.org">mailto:seaside-bounces@lists.squeakfoundation.org</A>> > [<A HREF="mailto:seaside-">mailto:seaside-</A><BR>
> > bounces@lists.squeakfoundation.org] On Behalf Of Ching de la Serna<BR>
> > Sent: Friday, August 10, 2007 3:23 PM<BR>
> > To: Seaside@lists.squeakfoundation.org<BR>
> > Subject: [Seaside] How to allow downloads in Seaside?<BR>
> ><BR>
> > Hi,<BR>
> ><BR>
> > If I were to allow downloads from my webpage, how would I go about<BR>
it?<BR>
> > Does Seaside have a method for doing this? Many thanks.<BR>
> ><BR>
> > Ching<BR>
><BR>
> _______________________________________________<BR>
> Seaside mailing list<BR>
> Seaside@lists.squeakfoundation.org<BR>
> <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A> <<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A>> <<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A>> ><BR>
_______________________________________________<BR>
Seaside mailing list<BR>
Seaside@lists.squeakfoundation.org < <A HREF="mailto:Seaside@lists.squeakfoundation.org">mailto:Seaside@lists.squeakfoundation.org</A> <<A HREF="mailto:Seaside@lists.squeakfoundation.org">mailto:Seaside@lists.squeakfoundation.org</A>> ><BR>
<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A> <<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A>><BR>
<BR>
_______________________________________________<BR>
Seaside mailing list<BR>
Seaside@lists.squeakfoundation.org<BR>
<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A> <<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A>> <<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A>> ><BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
_______________________________________________<BR>
Seaside mailing list<BR>
Seaside@lists.squeakfoundation.org <<A HREF="mailto:Seaside@lists.squeakfoundation.org">mailto:Seaside@lists.squeakfoundation.org</A>><BR>
<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A> <<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A>><BR>
<BR>
<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>