I hadn't realized that MAExternalFileModel was for
an uploaded file,
stored on disk. Making a new subclass to handle files originating on
the server, in "random" directories, sounds straightforward.
That's the model of a file as a bytearray with a name and mimetype.
I remain puzzled by how to hook these up to output, as
well as what the
responsibility of PRFile is. I've been using a custom component to
display the files, but since PRFile is a model it doesn't seem to belong
there.
That's the model of a file anywhere in the Pier structure tree. As it
was previously said, it refers to a MAFileModel.
I think a natural procedure would be to make a PRPage
and then use
addChild: to stick PRFile's into it.
That's what people do when they upload files through the web.
However, the list of files is
dynamic (depending on what's in the directory). How can I handle that?
What directory? In Pier there are only structures that form a
"virtual" directory tree of pages, files, seaside components, books,
chapters, blogs, posts, etc.
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch