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

http://www.lavrsen.dk/twiki/bin/viewfile/Motion/LinuxUvcTrackingPatch?rev=1;filename=uvctrack.diff

should be

http://www.lavrsen.dk/twiki/bin/viewfile/Motion/LinuxUvcTrackingPatch/uvctrack.diff?rev=1

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

This would make both wget and redirect rules work.

-- KJL

This has long been fixed

ItemTemplate edit

Summary viewfile script should take the filename as part of URL same way as view/edit/...
ReportedBy TWiki:Main.KennethLavrsen
Codebase
SVN Range Sun, 25 Jun 2006 build 10720
AppliesTo Engine
Component
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn 1.0.0
Topic revision: r4 - 11 Dec 2008, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy