Tags:
create new tag
view all tags
Module name viewfile ViewfileCgiScript
Location TWIKIROOT/bin/viewfile
Summary Presents contents of previous versions of attachments
Primary Author NicolasLee

CVS history http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/twiki/twiki/bin/viewfile
CVS alpha http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/twiki/twiki/bin/viewfile?rev=HEAD&content-type=text/vnd.viewcvs-markup
Contributing authors (see CVS History)
IsClass NO
First TWikiRelease twiki-19990614-beta

Purpose

This script delivers old versions of the attachments stored under the PubDirectory. The most recent version is directly exposed through Apache's mapping of the PubDirectory to a URL.

Used by

AttachViewfileWorkflow:

  • This cgi script is invoked by the user when clicking on 'action' from the attachment table to get to the attach screen then following the view link on one of listed versions in the bottom table.

TWiki Modules used

This CGI script depends on the following TWiki modules for functionality:

External Modules used

This CGI script also depends on the following external modules:

PublicMethods

This section lists the methods that can be used by the scripts and by other modules

  • ...

PrivateMethods

These do not need to be not documented yet

Please see CodevDocumentationProject and CodevDocumentationProjectDev for comments on the format of these pages.


Why not make it so that the all attachments are delivered using this script? This way, we could ensure that permissions are adhered to when viewing an attachment rather than have the pub directory exposed directly.

-- MartinCleaver - 01 Jul 2002

I'd like to see some discussion of module names in case there is ever an opportunity to do some renaming.

Maybe no renaming is necessary, but when I saw viewfile I was not immediately clear whether this meant viewing a TWiki page (which I know is stored in a plain txt file) or viewing an attached file.

If the module for viewing a page is named viewpage (or viewtopic) there is no problem, but if not, maybe we should rename name this module to "viewattachedfile".

Update: Ok, looking a little further, it seems that the modules to deal with a page (save, rename, etc.(?)) don't include an object in the name, so maybe things are better than I thought (once I am more familiar with the code).

But then, upload, which is for an attached file, does not include "file". Should it, for consistency?

-- RandyKramer - 01 Jul 2002

I agree that it would be clearer to have the scripts named more clearly and agree that viewattachment and uploadattachment would be clearer names. However, I'd put these on a nice-to-have list rather than a must-do list, for consideration when that part of the system is up for redesign rather than a reason to do such a redesign.

If CommonFrontEndCgiScript were to be implemented then these script names would become the name for the verbs. See CommonFrontEndCgiScript for details.

-- MartinCleaver - 02 Jul 2002

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2006-05-04 - SamHasler
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.