Loading...
 
Features / Usability

Features / Usability


Link to files insteadof upload (file galery)

posts: 35

Hello,
I've searched the forum for this subject, but only found old threads.

I use Tikiwiki 2.2.

My problem/question:
Instead of uploading files to the filegalery I want to link to existing files on the server.

I have 100+ "factsheets" (pdf) already on the server. They can by updated every now and then (some monthly, some 2 per year). I overwrite the old version by ftp. So, I use the same filename. A link to the file would be the best solution. The Image galery seems to support this, but the file galery doesn't.

Because I also want to link to the filegalery in the wiki, I don't think a batchupload solution would help to solve my problem (because you get a new ID then and that causes broken links).

Suzanne

posts: 3665 United States

>
>My problem/question:
Instead of uploading files to the filegalery I want to link to existing files on the server.
>

Easy. After you upload a file, Tiki assigns a unique ID to the file. To link directly to that file, use:
../tiki-download_file.php?fileId=XXX

If you're using the SEFURL feature, you can simply use:
../dlXXX



HTH,

-Rick
Need more help? Try TikiWiki for Dummies Smarties or read my Tiki Blog or visit my UserPage


posts: 35

Hi Rick,
I the problem is that i don't want to upload the files. Two reasons:

- they change frequently (more or less) and i only want the users to see the latest version.
- they already are on the server, when I have a new version, I just ftp them and rewrite the old ones

I don't mind making the 100+ records by hand in the file galery as long as I can link to the pdf file instead of uploading it.

Hope the problem is clear. I found similar questions on the forum, but no answer.

Suzanne

posts: 3665 United States

Sorry, but I don't understand.... If you're not uploading the files, how are you getting them into the File Gallery? Tiki will allow you to re-upload (that is, update) a file in the gallery.

If you simply want to link to a file elsewhere on your server, just create a regular link:
[http://your.domain.com/some_directory/some_file.foo|My File]

HTH,

-Rick
Need more help? Try TikiWiki for Dummies Smarties or read my Tiki Blog or visit my UserPage

posts: 35

I like the gallery cause you can organize things neatly together and make a galery for each subject...

I have a lot of (wine) factsheets and they do change frequently... Would there be a way to make a batch update script? I don't mind running that every now and then....

Suzanne

posts: 3665 United States

If you're using the Directory (not the database) to store your files, you can simply FTP the new file to the directory location, overriding the original file you uploaded.

Note that Tiki hashes the filename for security, so you'll need to change the filename to match, before you FTP.

HTH,

-Rick
Need more help? Try TikiWiki for Dummies Smarties or read my Tiki Blog or visit my UserPage

posts: 35

Hi Rick,
I use the database, but in the filegalery admin settings I see I can choose between database or folder, so I think this will solve the problem right away.

Thanx!

Suzanne