[Seaside] File to URL
nick.ager at gmail.com
Mon Nov 29 16:33:23 UTC 2010
The render methods are meant to generate html.
> renderContentOn: html
> MyFileLibrary addAllFilesIn: './'.
> MyFileLibrary addFileAt: 'test.pdf'.
These lines add the files all files in the local directory to the file
library and specifically test.pdf *each* time the browser requests a page.
Instead you only need to a file to the file library once. You can do this
programmatically say via the workspace in the your image:
MyFileLibrary addFileAt: '<path to file>/test.pdf'.
or via the web ui, by browsing to /config then selecting
> html image url: (MyFileLibrary urlOf: #testPdf).
You can then render a link to the file by:
html anchor url: (MyFileLibrary / #testPdf); with: 'click here to
download my pdf'
WAExternalFileLibrary is another option....
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside