Tags:
create new tag
, view all tags

Question

Hi,

I have installed Twiki in my intranet and some teams upload lot of documents in Twiki as attachments. Some of these documents are very huge in size.

I have the following requirement.

When the link to an attachment is sent through email, the recipient should be able to view the attachment by clicking on the link and then logging in to Twiki.

Currently, it works by logging to Twiki and clicking on the link from the email but I would prefer to have it other way.

Is it possible. Any help is appreciated

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Windows Server 2003
Web server: Apache 2.0
Perl version: ActivePerl-5.8.8.820
Client OS: Windows XP Professional
Web Browser: IE 6.0
Categories: Authentication

-- AnithaMadhan - 27 Jul 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

try the following:

http://MyServer/twiki/bin/viewfile/Web/Topic?filename=MyFile.pdf

You don't even need to login in order to open the attachment.

-- CarloSchulz - 30 Jul 2007

Clicking on the link takes me to the login page of Twiki. Once I login using the username and password, it gives me a message saying "Attachment ? does not exist".

When i click on the link, the Url is something like this

http://myserver/twiki/bin/viewfile/Web/SubWeb/SubWeb/Topic?rev=17;filename=usc.xls

This Url takes me to the login page. When I enter the username and password, the Url changes to something like this

"http://myserver/twiki/bin/oops/Web/SubWeb/SubWeb/Topic?template=oopsattention;def=no_such_attachment;param1=viewfile;param2=%3f"

But when I first login to Twiki and then click on the link, it lets me to view the file.

-- AnithaMadhan - 01 Aug 2007

strange, maybe it's different on my twiki site because of NatSkin...

Did you check the docu and attachment related questions already? I'm afraid I' not able to help you on this one...

-- CarloSchulz - 02 Aug 2007

Yes, Carlo. I tried changing the skin to patternskin and it allows me to view the file even without logging in. With Natskin, it asks for login and then gets redirected to some other page. Is there any way out of this with Natskin?

-- AnithaMadhan - 10 Aug 2007

I'm using NatSkin on my TWiki and accessing an attachment is possible without a login. Strange...

No... wait, check your "securitiy setup" in configure . There's an entry called {AuthScripts} . "Comma-separated list of scripts that require the user to authenticate." If viewfile is part of that list simply remove it.

-- CarloSchulz - 10 Aug 2007

Hi Carlo, I don't have viewfile in the AuthScripts entry. Following is the list of entries available under AuthScripts - attach,edit,manage,rename,save,upload,viewauth,rdiffauth.

Any further ideas?

-- AnithaMadhan - 11 Aug 2007

Not really. Did you check your logfiles? Maybe this can give you a hint why it's not working...

-- CarloSchulz - 13 Aug 2007

Sorry, closing this after more than 30 days of inactivity. Please feel free to reopen a new question.

-- PeterThoeny - 03 Oct 2007

I have encountered this problem too, and believe it's a URL parsing error that only occurrs when using NatSkin.

When logged in, this produces an attachment as expected. http://server/bin/viewfile/Main/TestTopic?filename=test.txt

Although, when logged out, it produces login screen: http://server/bin/login/Main/TestTopic?filename=test.txt;origurl=%2Fbin%2Fviewfile%2FMain%TestTopic%3Ffilename%3Dtest.txt

After logging in, another request is made to viewfile, but this fails with a redirect to an "Attachment '?' does not exist" page. http://server/bin/oops/Main/TestTopic?template=oopsattention;def=no_such_attachment;param1=viewfile;param2=%3f

Note the values for param1 and param2 are incorrect.

They should look like this, for a request for a non-existent attachment: http://server/bin/viewfile/Main/TestTopic?filename=doesntexist.txt http://server/bin/oops/Main/TestTopic?template=oopsattention;def=no_such_attachment;param1=viewfile;param2=doesntexist.txt

The data passed in from 'origurl' seems to have been parsed such that the filename is the question mark character, rather than 'test.txt' as it should have been. I have spent a bit of time searching for where this may occur with not much luck. It seems odd that the problem lies with NatSkin, rather than TWiki.

Any help would be greatly appreciated!

-- ChrisLJones - 12 Oct 2007

Please file a bug for this one. Maybe MichaelDaum knows how to fix this...

-- CarloSchulz - 12 Oct 2007

Change status to:
Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2007-10-14 - PeterThoeny
 
  • 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.