<br> (FileStream fileNamed: '.\somefolder\demo.mp3') is the receiver<br><br><div><span class="gmail_quote">On 8/12/07, <b class="gmail_sendername">Philippe Marschall</b> <<a href="mailto:philippe.marschall@gmail.com">
philippe.marschall@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2007/8/12, Ching de la Serna <<a href="mailto:ching.dls@gmail.com">
ching.dls@gmail.com</a>>:<br>> Hi,<br>><br>> I did a bit of testing and I can get text files downloaded but not mp3 or<br>> audio files. A message not understood #contentsOfEntireFile is returned.<br>> Does anyone have any ideas?
<br>><br>> This is the errant code:<br>> (FileStream fileNamed: '.\somefolder\demo.mp3') contentsOfEntireFile<br><br>What is the receiver?<br><br>Cheers<br>Philippe<br><br>> Ching<br>><br>><br>>
<br>> On 8/11/07, Ching de la Serna <<a href="mailto:ching.dls@gmail.com">ching.dls@gmail.com</a>> wrote:<br>> > The download worked. Sadly, an empty file was downloaded. 0 bytes.<br>> ><br>> ><br>
> > On 8/11/07, Ching de la Serna < <a href="mailto:ching.dls@gmail.com">ching.dls@gmail.com</a> > wrote:<br>> > > Thanks, Patrick. I will give it a try.If this works then I will have to<br>> look for some files to serve.
<br>> > ><br>> > > Ching<br>> > ><br>> > ><br>> > ><br>> > > On 8/11/07, Patrick Collison < <a href="mailto:patrick@collison.ie">patrick@collison.ie</a>> wrote:<br>
> > > > On 11/08/07, Ching de la Serna < <a href="mailto:ching.dls@gmail.com">ching.dls@gmail.com</a>> wrote:<br>> > > > > Thanks again, Boris. I am using Squeak. I suppose there is an<br>
> equivalent<br>> > > > > method? I am looking at ByteArray in Squeak and I do not see a<br>> method<br>> > > > > similar in name to #contentsOfEntireBinaryFile.<br>> > > ><br>
> > > > (FileStream fileNamed: 'foo') binary contents<br>> > ><br>> ><br>> ><br>> > as in: self<br>> > downloadBytes: (FileStream fileNamed: 'c:\play.wav') binary
<br>> contents<br>> > mime: 'audio/x-wav'<br>> > filename: 'play.wav'];<br>> > with: 'Download WAV File!'.<br>> > This is what I have and a file was downloaded with 0 bytes. Any ideas,
<br>> anyone?<br>> ><br>> ><br>> ><br>> > ><br>> > ><br>> > ><br>> > > > > On 8/11/07, Boris Popov < <a href="mailto:boris@deepcovelabs.com">boris@deepcovelabs.com
</a>> wrote:<br>> > > > > ><br>> > > > > ><br>> > > > > ><br>> > > > > > Its a standard method in visualworks to read entire file into a<br>> byte
<br>> > > > > array.<br>> > > > > ><br>> > > > > > Cheers!<br>> > > > > ><br>> > > > > > -Boris<br>> > > > > > (Sent from a BlackBerry)
<br>> > > > > ><br>> > > > > > ----- Original Message -----<br>> > > > > > From:<br>> > > > > <a href="mailto:seaside-bounces@lists.squeakfoundation.org">
seaside-bounces@lists.squeakfoundation.org</a><br>> > > > > <<br>> > > > > <a href="mailto:seaside-bounces@lists.squeakfoundation.org">seaside-bounces@lists.squeakfoundation.org</a> ><br>
> > > > > > To: Seaside - general discussion<br>> > > > > <<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a> ><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 < <a href="mailto:boris@deepcovelabs.com">boris@deepcovelabs.com</a>> wrote:<br>> > > > > ><br>> > > > > > Then you would just pass byte array to #downloadBytes, say
<br>> > > > > ><br>> > > > > > self<br>> > > > > > downloadBytes: 'c:\play.wav' asFilename<br>> contentsOfEntireBinaryFile<br>> > > > > >
<br>> > > > > ><br>> > > > > > how would #contentsOfEntireBinaryFile be<br>> implemented? That is if I intend<br>> > > > > 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
<br>> 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>><br>> > > > > ><br>> > > > > ><br>> > > > > >
<a href="mailto:boris@deepcovelabs.com">boris@deepcovelabs.com</a><br>> > > > > ><br>> > > > > > CONFIDENTIALITY NOTICE<br>> > > > > ><br>> > > > > > This email is intended only for the persons named in the
<br>> message<br>> > > > > > header. Unless otherwise indicated, it contains<br>> information that<br>> > > > > is<br>> > > > > > private and confidential. If you have received it in
<br>> error, please<br>> > > > > > notify the sender and delete the entire message including<br>> any<br>> > > > > > attachments.<br>> > > > > ><br>
> > > > > > Thank you.<br>> > > > > > ________________________________________<br>> > > > > > From:<br>> > > > > <a href="mailto:seaside-bounces@lists.squeakfoundation.org">
seaside-bounces@lists.squeakfoundation.org</a><br>> > > > > [<br>> > > > > mailto:<a href="mailto:seaside-bounces@lists.squeakfoundation.org">seaside-bounces@lists.squeakfoundation.org</a><br>
> > > > > ] 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 < <a href="mailto:boris@deepcovelabs.com">boris@deepcovelabs.com
</a>> 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<br>> music<br>> > > > > 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>> > > > > > <a href="mailto:boris@deepcovelabs.com">boris@deepcovelabs.com
</a><br>> > > > > ><br>> > > > > > CONFIDENTIALITY NOTICE<br>> > > > > ><br>> > > > > > This email is intended only for the persons named in the
<br>> message<br>> > > > > > header. Unless otherwise indicated, it contains<br>> information that<br>> > > > > is<br>> > > > > > private and confidential. If you have received it in
<br>> error, please<br>> > > > > > notify the sender and delete the entire message including<br>> any<br>> > > > > > attachments.<br>> > > > > ><br>
> > > > > > Thank you.<br>> > > > > ><br>> > > > > > > -----Original Message-----<br>> > > > > ><br>> > > > > > > From:
<br>> > > > > <a href="mailto:seaside-bounces@lists.squeakfoundation.org">seaside-bounces@lists.squeakfoundation.org</a><br>> > > > > [ mailto:<a href="mailto:seaside-">seaside-</a> <mailto: seaside->
<br>> > > > > > ><br>> > > > > <a href="mailto:bounces@lists.squeakfoundation.org">bounces@lists.squeakfoundation.org</a> ] On<br>> > > > > 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
<br>> 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>> > > > > > > <a href="mailto:boris@deepcovelabs.com">
boris@deepcovelabs.com</a><br>> > > > > > ><br>> > > > > > > CONFIDENTIALITY NOTICE<br>> > > > > > ><br>> > > > > > > This email is intended only for the persons named in the
<br>> message<br>> > > > > > > header. Unless otherwise indicated, it contains<br>> information that<br>> > > > > is<br>> > > > > > > private and confidential. If you have received it in
<br>> error,<br>> > > > > please<br>> > > > > > > notify the sender and delete the entire message<br>> including any<br>> > > > > > > attachments.
<br>> > > > > > ><br>> > > > > > > Thank you.<br>> > > > > > ><br>> > > > > > > > -----Original Message-----
<br>> > > > > > > > From:<br>> > > > > <a href="mailto:seaside-bounces@lists.squeakfoundation.org">seaside-bounces@lists.squeakfoundation.org</a><br>> > > > > <
<br>> > > > > mailto:<a href="mailto:seaside-bounces@lists.squeakfoundation.org">seaside-bounces@lists.squeakfoundation.org</a> ><br>> > > > > [mailto: seaside-<br>> > > > > > > >
<br>> > > > > <a href="mailto:bounces@lists.squeakfoundation.org">bounces@lists.squeakfoundation.org</a>] On<br>> > > > > Behalf Of Ching de la Serna<br>> > > > > > > > Sent: Friday, August 10, 2007 3:23 PM
<br>> > > > > > > > To:<br>> > > > > <a href="mailto:Seaside@lists.squeakfoundation.org">Seaside@lists.squeakfoundation.org</a><br>> > > > > > > > Subject: [Seaside] How to allow downloads in Seaside?
<br>> > > > > > > ><br>> > > > > > > > Hi,<br>> > > > > > > ><br>> > > > > > > > If I were to allow downloads from my webpage, how
<br>> would I go<br>> > > > > about<br>> > > > > > it?<br>> > > > > > > > Does Seaside have a method for doing this? Many<br>> thanks.<br>> > > > > > > >
<br>> > > > > > > > Ching<br>> > > > > > ><br>> > > > > > ><br>> _______________________________________________<br>> > > > > > > Seaside mailing list
<br>> > > > > > ><br>> > > > > <a href="mailto:Seaside@lists.squeakfoundation.org">Seaside@lists.squeakfoundation.org</a><br>> > > > > > ><br>> > > > >
<br>> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>> > > > ><br>> > > > > <<br>
> <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>> > > > > > Seaside mailing list<br>> > > > > ><br>> > > > > <a href="mailto:Seaside@lists.squeakfoundation.org">
Seaside@lists.squeakfoundation.org</a> <<br>> > > > > mailto:<a href="mailto:Seaside@lists.squeakfoundation.org">Seaside@lists.squeakfoundation.org</a>><br>> > > > > ><br>> > > > >
<br>> <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>> > > > > > Seaside mailing list<br>> > > > > ><br>> > > > > <a href="mailto:Seaside@lists.squeakfoundation.org">
Seaside@lists.squeakfoundation.org</a><br>> > > > > ><br>> > > > ><br>> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
</a><br>> > > > ><br>> > > > > <<br>> <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>> > > > > ><br>> > > > > > _______________________________________________
<br>> > > > > > Seaside mailing list<br>> > > > > > <a href="mailto:Seaside@lists.squeakfoundation.org">Seaside@lists.squeakfoundation.org</a><br>> > > > > ><br>> > > > >
<br>> <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>> > > > ><br>> > > > > _______________________________________________<br>> > > > > Seaside mailing list<br>> > > > >
<a href="mailto:Seaside@lists.squeakfoundation.org">Seaside@lists.squeakfoundation.org</a><br>> > > > ><br>> <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>> > > > Seaside mailing list<br>> > > > <a href="mailto:Seaside@lists.squeakfoundation.org">
Seaside@lists.squeakfoundation.org</a><br>> > > ><br>> <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>> ><br>><br>><br>> _______________________________________________<br>> Seaside mailing list<br>> <a href="mailto:Seaside@lists.squeakfoundation.org">
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><br>><br>><br>_______________________________________________
<br>Seaside mailing list<br><a href="mailto:Seaside@lists.squeakfoundation.org">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><br></blockquote></div><br>