Forum OpenACS Q&A: BehaveLikeFileSystemP

Collapse
Posted by Malte Sussdorff on
When the parameter was originally developed, behave like file system should support the fact that a file would be accessible by it's title instead of it's name when using the /view/index.vuh functionality (but not the download one).

Nowadays this has changed though, as the parameter will always try to download the file by the title given. This can have unforseen consequences:

a) Most users do not bother to add a file extension to the document, therefore it is not opened in some operating systems
b) If you have "?" or "&" in your title, you screw the download link.

What should be done about this? Should we allow the user to download the file with a different filename and the one under which is was uploaded? Shouldn't we keep the filename for the download and just use the title for display (e.g. a nice filename) ?

I prefer the latter, so taking out all the functionality with regards to using Title instead of Filename for download. This way you can access the file either through /download/fileNAME or /download/file_id or a combination of any of the two (index.vuh tries to be smart about this things).

Furthermore, why did we abandon /view/index.vuh and just use /download/index.vuh?