Not logged in. · Lost password · Register
Forum: General Help and Support Syntax and Usage RSS
any way to link to a local file for download
Avatar
daren_phi #1
Member since Apr 2012 · 58 posts
Group memberships: Members
Show profile · Link to this post
Subject: any way to link to a local file for download
Hi there,
  I have few documents (in pdf and rar) will be put to a specific folder in the data director of the dokuwiki. Let says, the doku data director is datalib and I creates two sub folders there

datalib/documents/pdf
datalib/documents/rar

So how do I link the files stored in these two folders? I try

[[./datalib/documents/pdf/test.pdf|demo]]
{{datalib/documents/pdf/test.pdf|demo}}

But it doesn't help. If I use the absolute external link, I think the data structure will be exposed and I don't want to do so. Any idea? Thanks.
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4696 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Use namespaces: 
  {{:pdf:test.pdf|demo}}
where pdf is a direct subdirectory of media.  Why don't you use the media manager for this?  It will create the correct links for you.

See: https://www.dokuwiki.org/wiki:syntax#images_and_other_files
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
daren_phi #3
Member since Apr 2012 · 58 posts
Group memberships: Members
Show profile · Link to this post
Quote by turnermm:
Use namespaces: 
  {{:pdf:test.pdf|demo}}
where pdf is a direct subdirectory of media.  Why don't you use the media manager for this?  It will create the correct links for you.

See: https://www.dokuwiki.org/wiki:syntax#images_and_other_files

Hi turnermm, I would like to use media manager but from the very beginning after I install doku, I never succeed to open the media manager and get the file uploaded. I check here https://www.dokuwiki.org/media_manager it shows that there will be some GUI interface to pop up for selecting my file, but I never get that one. Anyway , instead of that, there will be a dialog pop up and I choose my file to upload; but it always show 'failure' no matter what file type I upload. This problem bother me for a long time.
Avatar
daren_phi #4
Member since Apr 2012 · 58 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
hi turnermm again,
  I don't know why media manager doesn't work in my computer. I find other one and try to login again, I can upload the file though it still report "failed". But I saw it uploaded in the server. My question is, when I upload it by specifying the namespace, I use ":wiki:pdf:test.pdf" (no quote) instead, then the file uploaded to media/wiki/pdf, that's good. However,

  {{:wiki:pdf:test.pdf|demo}}

will show the plain test instead of the link. Then I try to upload another pdf with namespace ":pdf:test2.pdf" but again {{ }} doesn't show me a link, only plain test instead.

I saw the similar problem someone has in the forum, I am trying to disable all plugins I installed, but it doesn't help the problem, weird!

Quote by turnermm:
Use namespaces: 
  {{:pdf:test.pdf|demo}}
where pdf is a direct subdirectory of media.  Why don't you use the media manager for this?  It will create the correct links for you.

See: https://www.dokuwiki.org/wiki:syntax#images_and_other_files
This post was edited on 2013-01-13, 05:46 by daren_phi.
Avatar
turnermm (Moderator) #5
Member since Oct 2009 · 4696 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
I never succeed to open the media manager and get the file uploaded. I check here https://www.dokuwiki.org/media_manager it shows that there will be some GUI interface to pop up for selecting my file, but I never get that one. Anyway , instead of that, there will be a dialog pop up and I choose my file to upload

There are two ways to access the media manager:

1. from the "media manager" link at the top of the page (if you are using the new dokuwiki template) or else  from a button at the bottom (if you are using an older template)
2. from the toolbar in the editor, which gets the pop-up.

It sounds to me as though you are using method 2.  When you upload a file, you don't use the namespace markup.  You have to use the "select files" and "upload" buttons.  Click "select file" and choose a file from your computer.  After it is selected the file name appears in the text box.  Do not edit that name.  Just click on 'upload'.  The file should be uploaded.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
tom_c #6
Member since Jan 2011 · 33 posts · Location: Hackettstown, NJ, US
Group memberships: Members
Show profile · Link to this post
For your original request to link to files for downloading look at the filelist plugin.

https://www.dokuwiki.org/plugin:filelist
Avatar
turnermm (Moderator) #7
Member since Oct 2009 · 4696 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
the filelist plugin shouldn't be needed.  If a user has read access, then he/she should be able to access the download.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-09-16, 22:39:25 (UTC +02:00)