Question
With version 4 of TWiki, I can no longer us wget to download attachments. For example if I try download the following link:
wget
http://twiki.org/cgi-bin/viewfile/Plugins/WorkflowPlugin?rev=1;filename=WorkflowPlugin_installer
I instead get the following file, which is an html file:
WorkflowPlugin?template=oopsaccessdenied;def=no_such_attachment;param1=viewfile;param2=?
Any suggestions?
Environment
--
ChrisPurves - 20 Sep 2006
Answer
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.
The file wouldn't download because bash thought the semicolon was the end of the command. Adding quotes fixed the problem:
wget 'http://twiki.org/cgi-bin/viewfile/Plugins/WorkflowPlugin?rev=1;filename=WorkflowPlugin_installer' downloaded the correct file. But then it named it as
WorkflowPlugin?rev=1;filename=WorkflowPlugin_installer
, so specifying the output file helped:
wget 'http://twiki.org/cgi-bin/viewfile/Plugins/WorkflowPlugin?rev=1;filename=WorkflowPlugin_installer' -O WorkflowPlugin_installer
That did what I wanted.
--
ChrisPurves - 20 Sep 2006
Try this:
wget http://twiki.org/p/pub/Plugins/WorkflowPlugin/WorkflowPlugin.zip
. Personally, I just have a saved clip of the url up to the web and then fill in the plugin topic name and attachment name. Works like a charm. BTW, this is the url that's created if you select "insert link to file in topic" option in the attachment dialog.
--
LynnwoodBrown - 20 Sep 2006