[Seaside] Embedding Flash in Pier / Direct link to File

Lukas Renggli renggli at gmail.com
Tue May 20 08:55:26 UTC 2008

>  Basically this is what I want: Add a File (e.g. an image or flash) and
>  get a persistent url for this file.

Every structure in Pier has a persistent URL. If add a new file it
gets an URL with the name you gave it. The following examples assume
that you have added a file (an image) named 'foo' to the root of your
Pier instance.

1. You can navigate to this structure using the URL

2. You can link to this structure from within a document using */foo*.

3. You can embed the image from within a document using +/foo+.

Now, from what I understood in your mail you wanted to get the URL to
the file. With approaches 1 - 3 this is not possible, as they render a
full XHTML tag.

>  Right now, an image is rendered like this.
>  <img alt="Img" src="http://localhost/seaside/pier?_s=DMlOFQSiJzBSgkqh">

If you configure MAExternalFileModel properly, Seaside will not server
the files itself and you will get a static URL here. However I agree
that copying and pasting an URL into a document is not nice.

>  This causes problems, because the image has no real filename. If you
>  e.g. want to open the image into a new window, the file is downloaded.

Load the latest code from Pier-Model and Pier-Seaside and try the
syntax in the document.


This will only render the URL of the referenced object and should
solve your problem nicely. Also when you move the file, the URL will
automatically update.

I know that the whole view-renderer of Pier is getting ugly. A
(backward compatible) rewrite of that part is long overdue. I just
need to find some time to do it.


Lukas Renggli

More information about the seaside mailing list