[pmwiki-users] File manager -- links to files that have not been uploade
chr at home.se
chr at home.se
Sun Mar 20 12:22:27 CST 2005
On Sun, 20 Mar 2005 chr at home.se wrote:
> I'm thinking of installing separate software to manage uploaded files
> (including uploading, renaming, directory creation etc). There seems to be
> a lot of file managers written in PhP, so right now I'm focusing on how to
> interface the wiki. This is just a start to figure out what API I need.
>
> Let's assume that the file manager is invoked by going to a URI such as:
>
> http://www.pmwiki.org/filemanager.php?...
>
> How can I now make PmWiki interface with it?
This post will discuss what I'd like to happen if the uploaded file that
you refer to using e.g. uploads:file.txt doesn't exist.
!!! Linking to files and directories that do not exist
When you use a directive such as
uploads:file.txt
it would normally create a link that points to
UPLOADS/{$Group}/file.txt
However, if that file doesn't exist, I'd like the markup to be rendered
similar to what happens when we use Attach: today. In other words, it
could be rendered as "uploads:file.txt?", and clicking on the "?" the
file should invoke the file manager with suitable arguments to make it
easy for the user to upload the corresponding file.
I guess that is basically it... the recipe would have to be able to parse
the path argument, check if the file exists and create the proper link
accordingly.
I guess it's now time for thoughts on how this could be implemented in
pmwiki? As for the interface to the file manager, I believe we are talking
about these functions that need to be invoked somehow:
* Browse a specific directory
* Upload a named file to a specific directory
* Start the file manager in general
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list