[Seaside] Making a download page

John McKeon p3anoman at gmail.com
Wed Mar 9 16:25:59 UTC 2011


Ricardo,

 You can use WAAnchorTag>>#document:mimeType:fileName: to render a download
link.
Have a look at the code for WAUploadFunctionalTest>>#renderDownloadLinksOn:
to see how it is used.
(If you look at the test in the browser, you will have to upload a file
first before you will see the download links rendered)

Hope this helps
John



On Wed, Mar 9, 2011 at 10:07 AM, Ricardo Jacas <ricardo.jacas at gmail.com>wrote:

> how can i actually do the download?  i,ve been trying for hours.... :/
>
> 2011/3/8 Ricardo Jacas <ricardo.jacas at gmail.com>:
> > thx Avi, i'll give it a try :)
> >
> > 2011/3/8 Avi Shefi <avishefi at gmail.com>:
> >> Serving them directly from a webserver can be performed in two ways:
> >> 1) completely detached from Seaside, where the links are simply
> external.
> >> 2) referenced by FileLibrary, but served through the webserver. This can
> be
> >> done using the new X-Sendfile functionality (using the base url as
> >> mentioned).
> >>
> >>
> >> Avi.
> >>
> >> On Tue, Mar 8, 2011 at 10:59 PM, Robert Sirois <watchlala at hotmail.com>
> >> wrote:
> >>>
> >>> Then the web server would be serving them directly (nginx, apache,
> etc.),
> >>> right?
> >>>
> >>> I'm interested in this, too. I was gonna be looking at doing something
> >>> similar to Dropbox or Base Camp.
> >>>
> >>> RS
> >>>
> >>> ________________________________
> >>> Date: Tue, 8 Mar 2011 22:19:53 +0200
> >>> Subject: Re: [Seaside] Making a download page
> >>> From: avishefi at gmail.com
> >>> To: seaside at lists.squeakfoundation.org
> >>>
> >>> There are several options to this.
> >>>  - Upload all files to the file library in advance, and display them to
> >>> the user. The FileLibrary also provides mechanism for loading new
> files, so
> >>> there should be no problem to update it.
> >>>  - Load files from the filesystem into the filelibrary (using
> >>> WAFileLibrary>>#addFile, or WAFileLibrary class >>#addFileAt: /
> >>> addAllFilesIn: ).
> >>>  - There's a new option on Seaside 3.0.4 which allows you to specify a
> >>> configuration value for file handlers that determines the base url of a
> file
> >>> library. This way, your absolute urls would be:
> >>> <base-url>/<file-library-name>/<file-name>
> >>>
> >>> You can also refer to files directly on the filesystem, which doesn't
> >>> require any FileLibrary support.
> >>>
> >>>
> >>> Avi.
> >>>
> >>> On Tue, Mar 8, 2011 at 9:02 PM, Ricardo Jacas <ricardo.jacas at gmail.com
> >
> >>> wrote:
> >>>
> >>> Hi, i'm trying to make a simple downloading function from files
> >>> already in the server.
> >>> I was using the book's example but i cant make it work, because the
> >>> example already has the file in a variable, and i need to refer a file
> >>> in the system.
> >>> anyone got a simple solution?
> >>>
> >>> Thanks beforehand for any help on this :)
> >>>
> >>> --
> >>> lets reign all together
> >>> _______________________________________________
> >>> 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
> >>> _______________________________________________
> >>> 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
> >>
> >>
> >
> >
> >
> > --
> > lets reign all together
> >
>
>
>
> --
> lets reign all together
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
http://john-mckeon.us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110309/e690dc92/attachment.htm


More information about the seaside mailing list