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 [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/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 [hidden email] 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: [hidden email] [mailto:seaside- > [hidden email]] On Behalf Of Ching de la Serna > Sent: Friday, August 10, 2007 3:23 PM > To: [hidden email] > 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 [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Sigh, obviously anchor would need to be closed,
html anchor callback: [self downloadBytes: self asCSV 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 [hidden email] 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: [hidden email] [mailto:seaside- > [hidden email]] 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 > > [hidden email] > > 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: [hidden email] [mailto:seaside- > > [hidden email]] On Behalf Of Ching de la Serna > > Sent: Friday, August 10, 2007 3:23 PM > > To: [hidden email] > > Subject: [Seaside] How to allow downloads in Seaside? > > > > Hi, > > > > If I were to allow downloads from my webpage, how would I go about > > Does Seaside have a method for doing this? Many thanks. > > > > Ching > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thanks Boris.
On 8/11/07, Boris Popov <[hidden email]> wrote: Sigh, obviously anchor would need to be closed, could you show me sample code on #asCSV? I am thinking of music files to be downloaded. mime: 'text/csv' _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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 [hidden email] 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: [hidden email] [mailto:[hidden email]] 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 <[hidden email]> 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 [hidden email] 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: [hidden email] [mailto:seaside- > [hidden email] ] 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 > > [hidden email] > > 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: [hidden email] [mailto:seaside- > > [hidden email]] On Behalf Of Ching de la Serna > > Sent: Friday, August 10, 2007 3:23 PM > > To: [hidden email] > > Subject: [Seaside] How to allow downloads in Seaside? > > > > Hi, > > > > If I were to allow downloads from my webpage, how would I go about > > Does Seaside have a method for doing this? Many thanks. > > > > Ching > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thanks again, Boris.
On 8/11/07, Boris Popov <[hidden email]> wrote: Then you would just pass byte array to #downloadBytes, say how would #contentsOfEntireBinaryFile be implemented? That is if I intend to allow the download of an entire audio file that is in my server?. mime: 'audio/x-wav' _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by ching
Its a standard method in visualworks to read entire file into a byte array. _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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.
On 8/11/07, Boris Popov <[hidden email]> wrote:
_______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by ching
The protocol is likely to be on a filename class not bytearray, but I don't squeak, so... _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by ching
On 11/08/07, Ching de la Serna <[hidden email]> wrote:
> 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. (FileStream fileNamed: 'foo') binary contents > On 8/11/07, Boris Popov <[hidden email]> wrote: > > > > > > > > Its a standard method in visualworks to read entire file into a byte > array. > > > > Cheers! > > > > -Boris > > (Sent from a BlackBerry) > > > > ----- Original Message ----- > > From: > [hidden email] > < > [hidden email]> > > To: Seaside - general discussion > <[hidden email]> > > Sent: Fri Aug 10 16:50:51 2007 > > Subject: Re: [Seaside] How to allow downloads in Seaside? > > > > Thanks again, Boris. > > > > > > On 8/11/07, Boris Popov <[hidden email]> wrote: > > > > Then you would just pass byte array to #downloadBytes, say > > > > self > > downloadBytes: 'c:\play.wav' asFilename contentsOfEntireBinaryFile > > > > > > how would #contentsOfEntireBinaryFile be implemented? That is if I intend > to allow the download of an entire audio file that is in my server?. > > > > > > > > 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 < http://tinyurl.com/r7uw4> > > > > > > [hidden email] > > > > 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: > [hidden email] > [ > mailto:[hidden email] > ] 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 < [hidden email]> 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 > > > > [hidden email] > > > > 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: > [hidden email] > [ mailto:seaside- <mailto:seaside-> > > > > [hidden email] ] 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 > > > > > > [hidden email] > > > > > > 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: > [hidden email] > < > mailto:[hidden email]> > [mailto:seaside- > > > > > [hidden email]] On > Behalf Of Ching de la Serna > > > > Sent: Friday, August 10, 2007 3:23 PM > > > > To: > [hidden email] > > > > 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 > > > > [hidden email] > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > > Seaside mailing list > > > [hidden email] < > mailto:[hidden email]> > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > _______________________________________________ > > Seaside mailing list > > > [hidden email] > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > _______________________________________________ > > Seaside mailing list > > [hidden email] > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thanks, Patrick. I will give it a try.If this works then I will have to look for some files to serve.
Ching On 8/11/07, Patrick Collison <[hidden email]> wrote: On 11/08/07, Ching de la Serna <[hidden email]> wrote: _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
The download worked. Sadly, an empty file was downloaded. 0 bytes.
On 8/11/07, Ching de la Serna <[hidden email]> wrote: Thanks, Patrick. I will give it a try.If this works then I will have to look for some files to serve. as in: self downloadBytes: (FileStream fileNamed: 'c:\play.wav') binary contents mime: 'audio/x-wav' filename: 'play.wav']; with: 'Download WAV File!'. This is what I have and a file was downloaded with 0 bytes. Any ideas, anyone?
_______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi,
I did a bit of testing and I can get text files downloaded but not mp3 or audio files. A message not understood #contentsOfEntireFile is returned. Does anyone have any ideas? This is the errant code: (FileStream fileNamed: '.\somefolder\demo.mp3') contentsOfEntireFile Ching On 8/11/07, Ching de la Serna <[hidden email]> wrote: The download worked. Sadly, an empty file was downloaded. 0 bytes. _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2007/8/12, Ching de la Serna <[hidden email]>:
> Hi, > > I did a bit of testing and I can get text files downloaded but not mp3 or > audio files. A message not understood #contentsOfEntireFile is returned. > Does anyone have any ideas? > > This is the errant code: > (FileStream fileNamed: '.\somefolder\demo.mp3') contentsOfEntireFile What is the receiver? Cheers Philippe > Ching > > > > On 8/11/07, Ching de la Serna <[hidden email]> wrote: > > The download worked. Sadly, an empty file was downloaded. 0 bytes. > > > > > > On 8/11/07, Ching de la Serna < [hidden email] > wrote: > > > Thanks, Patrick. I will give it a try.If this works then I will have to > look for some files to serve. > > > > > > Ching > > > > > > > > > > > > On 8/11/07, Patrick Collison < [hidden email]> wrote: > > > > On 11/08/07, Ching de la Serna < [hidden email]> wrote: > > > > > 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. > > > > > > > > (FileStream fileNamed: 'foo') binary contents > > > > > > > > > as in: self > > downloadBytes: (FileStream fileNamed: 'c:\play.wav') binary > contents > > mime: 'audio/x-wav' > > filename: 'play.wav']; > > with: 'Download WAV File!'. > > This is what I have and a file was downloaded with 0 bytes. Any ideas, > anyone? > > > > > > > > > > > > > > > > > > > > On 8/11/07, Boris Popov < [hidden email]> wrote: > > > > > > > > > > > > > > > > > > > > > > > > Its a standard method in visualworks to read entire file into a > byte > > > > > array. > > > > > > > > > > > > Cheers! > > > > > > > > > > > > -Boris > > > > > > (Sent from a BlackBerry) > > > > > > > > > > > > ----- Original Message ----- > > > > > > From: > > > > > [hidden email] > > > > > < > > > > > [hidden email] > > > > > > > To: Seaside - general discussion > > > > > <[hidden email] > > > > > > > Sent: Fri Aug 10 16:50:51 2007 > > > > > > Subject: Re: [Seaside] How to allow downloads in Seaside? > > > > > > > > > > > > Thanks again, Boris. > > > > > > > > > > > > > > > > > > On 8/11/07, Boris Popov < [hidden email]> wrote: > > > > > > > > > > > > Then you would just pass byte array to #downloadBytes, say > > > > > > > > > > > > self > > > > > > downloadBytes: 'c:\play.wav' asFilename > contentsOfEntireBinaryFile > > > > > > > > > > > > > > > > > > how would #contentsOfEntireBinaryFile be > implemented? That is if I intend > > > > > to allow the download of an entire audio file that is in my server?. > > > > > > > > > > > > > > > > > > > > > > > > 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 < http://tinyurl.com/r7uw4> > > > > > > > > > > > > > > > > > > [hidden email] > > > > > > > > > > > > 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: > > > > > [hidden email] > > > > > [ > > > > > mailto:[hidden email] > > > > > ] 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 < [hidden email]> 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 > > > > > > > > > > > > [hidden email] > > > > > > > > > > > > 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: > > > > > [hidden email] > > > > > [ mailto:seaside- <mailto: seaside-> > > > > > > > > > > > > [hidden email] ] 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 > > > > > > > > > > > > > > [hidden email] > > > > > > > > > > > > > > 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: > > > > > [hidden email] > > > > > < > > > > > mailto:[hidden email] > > > > > > [mailto: seaside- > > > > > > > > > > > > > [hidden email]] On > > > > > Behalf Of Ching de la Serna > > > > > > > > Sent: Friday, August 10, 2007 3:23 PM > > > > > > > > To: > > > > > [hidden email] > > > > > > > > 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 > > > > > > > > > > > > [hidden email] > > > > > > > > > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > < > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > _______________________________________________ > > > > > > Seaside mailing list > > > > > > > > > > > [hidden email] < > > > > > mailto:[hidden email]> > > > > > > > > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Seaside mailing list > > > > > > > > > > > [hidden email] > > > > > > > > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > < > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Seaside mailing list > > > > > > [hidden email] > > > > > > > > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Seaside mailing list > > > > > [hidden email] > > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > _______________________________________________ > > > > Seaside mailing list > > > > [hidden email] > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > > > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
(FileStream fileNamed: '.\somefolder\demo.mp3') is the receiver On 8/12/07, Philippe Marschall <[hidden email]> wrote: 2007/8/12, Ching de la Serna <[hidden email]>: _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2007/8/12, Ching de la Serna <[hidden email]>:
> > (FileStream fileNamed: '.\somefolder\demo.mp3') is the receiver What object receives #contentsOfEntireFile? Or to put it in an other way, to what does (FileStream fileNamed: '.\somefolder\demo.mp3') evaluate? Cheers Philippe > On 8/12/07, Philippe Marschall < [hidden email]> wrote: > > > > 2007/8/12, Ching de la Serna < [hidden email]>: > > > Hi, > > > > > > I did a bit of testing and I can get text files downloaded but not mp3 > or > > > audio files. A message not understood #contentsOfEntireFile is returned. > > > Does anyone have any ideas? > > > > > > This is the errant code: > > > (FileStream fileNamed: '.\somefolder\demo.mp3') contentsOfEntireFile > > > > What is the receiver? > > > > Cheers > > Philippe > > > > > Ching > > > > > > > > > > > > On 8/11/07, Ching de la Serna <[hidden email]> wrote: > > > > The download worked. Sadly, an empty file was downloaded. 0 bytes. > > > > > > > > > > > > On 8/11/07, Ching de la Serna < [hidden email] > wrote: > > > > > Thanks, Patrick. I will give it a try.If this works then I will have > to > > > look for some files to serve. > > > > > > > > > > Ching > > > > > > > > > > > > > > > > > > > > On 8/11/07, Patrick Collison < [hidden email]> wrote: > > > > > > On 11/08/07, Ching de la Serna < [hidden email]> wrote: > > > > > > > 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. > > > > > > > > > > > > (FileStream fileNamed: 'foo') binary contents > > > > > > > > > > > > > > > > > as in: self > > > > downloadBytes: (FileStream fileNamed: 'c:\play.wav') binary > > > contents > > > > mime: 'audio/x-wav' > > > > filename: 'play.wav']; > > > > with: 'Download WAV File!'. > > > > This is what I have and a file was downloaded with 0 bytes. Any > ideas, > > > anyone? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 8/11/07, Boris Popov < [hidden email] > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Its a standard method in visualworks to read entire file into > a > > > byte > > > > > > > array. > > > > > > > > > > > > > > > > Cheers! > > > > > > > > > > > > > > > > -Boris > > > > > > > > (Sent from a BlackBerry) > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > > > > From: > > > > > > > [hidden email] > > > > > > > < > > > > > > > [hidden email] > > > > > > > > > To: Seaside - general discussion > > > > > > > <[hidden email] > > > > > > > > > Sent: Fri Aug 10 16:50:51 2007 > > > > > > > > Subject: Re: [Seaside] How to allow downloads in Seaside? > > > > > > > > > > > > > > > > Thanks again, Boris. > > > > > > > > > > > > > > > > > > > > > > > > On 8/11/07, Boris Popov < [hidden email]> wrote: > > > > > > > > > > > > > > > > Then you would just pass byte array to #downloadBytes, > say > > > > > > > > > > > > > > > > self > > > > > > > > downloadBytes: 'c:\play.wav' asFilename > > > contentsOfEntireBinaryFile > > > > > > > > > > > > > > > > > > > > > > > > how would #contentsOfEntireBinaryFile be > > > implemented? That is if I intend > > > > > > > to allow the download of an entire audio file that is in my > server?. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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 < http://tinyurl.com/r7uw4> > > > > > > > > > > > > > > > > > > > > > > > > [hidden email] > > > > > > > > > > > > > > > > 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: > > > > > > > [hidden email] > > > > > > > [ > > > > > > > > mailto:[hidden email] > > > > > > > ] 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 < [hidden email] > > 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 > > > > > > > > > > > > > > > > [hidden email] > > > > > > > > > > > > > > > > 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: > > > > > > > [hidden email] > > > > > > > [ mailto:seaside- <mailto: seaside-> > > > > > > > > > > > > > > > > [hidden email] ] 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 > > > > > > > > > > > > > > > > > > [hidden email] > > > > > > > > > > > > > > > > > > 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: > > > > > > > [hidden email] > > > > > > > < > > > > > > > > mailto:[hidden email] > > > > > > > > [mailto: seaside- > > > > > > > > > > > > > > > > > [hidden email]] On > > > > > > > Behalf Of Ching de la Serna > > > > > > > > > > Sent: Friday, August 10, 2007 3:23 PM > > > > > > > > > > To: > > > > > > > [hidden email] > > > > > > > > > > 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 > > > > > > > > > > > > > > > > [hidden email] > > > > > > > > > > > > > > > > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > < > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > Seaside mailing list > > > > > > > > > > > > > > > [hidden email] < > > > > > > > mailto:[hidden email]> > > > > > > > > > > > > > > > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > Seaside mailing list > > > > > > > > > > > > > > > [hidden email] > > > > > > > > > > > > > > > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > < > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > Seaside mailing list > > > > > > > > [hidden email] > > > > > > > > > > > > > > > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > Seaside mailing list > > > > > > > [hidden email] > > > > > > > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Seaside mailing list > > > > > > [hidden email] > > > > > > > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Seaside mailing list > > > [hidden email] > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > _______________________________________________ > > Seaside mailing list > > [hidden email] > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Boris Popov, DeepCove Labs (SNN)
Hi Boris, ]
Thanks for the suggestions. I found the equivalent in Squeak which is #contentsOfEntireFile and I can download text files using your code. Sadly, I still have to find success with mp3 files. Any suggestions? Chingg On 8/11/07, Boris Popov <[hidden email]> wrote:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |