• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

viewfile was recently introduced to enable access rights to the attachments.

The idea is that you can close directly access to ATTACHURL in webs where you only have documentes attached. Ie. not TWiki dir where you need quick access to graphics, CSS files, javascript. Viewfile is too slow for this.

So viewfile is a good thing in itself.

But it gives at least TWO issues the way it works now.

  • The URL you get when you copy the link from the attachment table is not at all easy to get to work with programs such a wget. I have many complaints about it from my Motion TWiki.
  • The filename given to viewfile is in a parameter to the URL instead of being part of the URL itself. This makes it impossible to make a redirect rule in Apache to redirect links to spam html files for example. And the spammers have found out about this now. I have seen spam on my TWiki where the viewfile URL had been used when spamming other guestbooks and blogs.

The solution that will solve both is

The URL such as


should be


and defaulting to latest revision if there is no 'rev' parameter.

This would make both wget and redirect rules work.

-- KJL

Summary viewfile script should take the filename as part of URL same way as view/edit/...
ReportedBy TWiki:Main.KennethLavrsen
Codebase ~twiki4, ~develop
SVN Range Sun, 25 Jun 2006 build 10720
AppliesTo Engine

Priority Enhancement
CurrentState New


TargetRelease n/a
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r3 - 2006-06-28 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback