Features / Usability

Features / Usability

Designating File Gallery Upload Folder on Server

posts: 753 United States

Good day folks, we are running Tiki Beta 14, here is our url http://thepatriotwoodwiki.com/tiki-index.php
I am having issues trying to direct any files uploaded to a folder on our server. I want to use the tiki root folder at public_html/uploads/filegallery
But no matter how I configure the settings it seems to be uploading to database.
Here is the url of an image I uploaded to the "Administrative" file gallery folder on our site: http://thepatriotwoodwiki.com/tiki-ajax_services.php?controller=file_finder&action=finder&defaultGalleryId=1&deepGallerySearch=1&cmd=file&target=f1_Zl80

Here is how I have my server folders set in the Set Up File Storage wizard prompt:
Following the instructions here at https://doc.tiki.org/File+Storage under the heading "Storing Files in a Directory" I think I chose the absolute method. The path I chose leads to public_html where tiki resides.
Am I doing this right? Thanks for any help.

posts: 753 United States

OK, I take it all back, I set the directory up lastnight, and this morining it is now working, I now have my images and files going exactly where I need them too go.

Hmm. I am bewildered.

I do have a related question though, per the above mentioned tutorial for File Storage it states this: Use a directory inside the DocumentRoot (relative to Tiki dir for example) and prevent listing the directory using .htaccess file or other configuration on your webserver.

That is my method I think, using a directory in the DocumentRoot. I am assumming the DocumentRoot is the directory Tiki is installed in.

Is there any guidance on how the .htaccess file should look? thanks again folks.

posts: 1562 Germany

Hello J,

the .htaccess in a directory that shall not be readable from the web can be set up as following:

Copy to clipboard
<FilesMatch ".*"> order deny,allow deny from all </FilesMatch>

Anyway I'd strongly suggest to use a different setup and to store the files "outside the tiki root" in a directory where no domain points to.

Given, your public_html is equal the Tiki root, you could create a folder a level higher "besides" the public_html.


htdocs/useraccount/files/wiki (optional, I use gallery)

Then your path in the tiki-admin.php?page=fgal would be:

Copy to clipboard

The two dots before the slash mean "one directory level up".

Please mind to set appropriate permissions to the files directory recursively - if nothing else works, use:
chmod -R 777 files (or analog in a cpanel dialogue)

Do you work with cPanel?
A hint:

In standard cPanel setups on usual shared hosting, the primary domain always points directly to public_html.

This is very bad, if you want to install more than one website, as then you literally are forced to install websites "into each other".
You could ask your provider to change the document_root (of the primary domain) to a subdirectory of public_html.
This way you could install your Tiki into a directory alike /htdocs/useraccount/public_html/tikiroot and then have plenty of space for parallel additional installations - at least very handy, when you want to install and test an upgrade of your side without risking to brake the live site.

IHope that helps,

posts: 753 United States

Torsten, thank you so much, that is a HUGE help! And excellent advice on the structure of where the sites reside, thanks for that. I do however have an account that will allow me to create unlimited cpanel accounts with separate domains, so I am able to allow a test site in its own cpanel with it's own root folder. I think this is ok right? Or is it still better to have a test version in the same cpanel as my live Tiki?

And I am going to now create a folder for the files outside of the Tiki root, that was also a suggestion in the Tiki tutorial for setting up file storage, and I will now implement that based on your suggestion. I apreciate that bit of advice much.

So, do I need to change my tiki-admin.php even if make the changes for the file directory in the Wizard setup?

Thanks Torsten,

posts: 1562 Germany

 No need to:

So, do I need to change my tiki-admin.php even if make the changes for the file directory in the Wizard setup?

Wizard and tiki-admin.php store and read the preferences in the very same fields of the database (no doubling or so - then the Wizard would not make sense at all).

Everything you set in the Wizard, you will find the exact same as saved when you go to tiki-admin.php. The Wizard simply wants to help to shorten initial setup time, if you do not yet figured out (or need) to setup your own profiles website ;-) .


I think this is ok right? Or is it still better to have a test version in the same cpanel as my live Tiki?

Not necessary on your setup. Just figure out yourself, which setup is more time saving, respectively efficient for you. My hint was more for average shared hosting cPanel setups or for people providing cPanels for projects or customers.


posts: 753 United States

Thanks again Torsten. The Wizard is a wonderful tool for us. I love it. Though it does not cover all things, as I don't think that would be possible as the variable are just too many, but the basics it does cover gets the average user (me) up and running beautifully. The wizard was a great addition.

I'll learn to set more custom items up as I go, but for now, yes, the Wizard it is! Tiki should make an icon for the Wizard, that looks like a Wizard, a tall hat and all.

Thanks as always.

posts: 753 United States

I am still pondering the path that shows up when I perform a windows "View Image Info" for my images in the file gallery. The latest image I loaded up has a file path like this:


I see the image made it to the proper directory on my server, but above it appears it is going into the tiki-ajax_services.php

And when I view my image in the directory it has name like this as seen below in my cpanel screen capture. Why isn't the original image name preserved? Thanks again!


posts: 1562 Germany

Hi J,

The link you provided is created by the elFinder galery frontend (made with JavaScript/jQuery). and Ajax is kind of a JavaScript protocol to allow browsers communicate with the server without reloading the page.

No clue if Ajax makes sense in this specific situation, but anyway it was obviously used by the elFinder coders.

When you use the classic "List" view of the gallery and you display the image you get this one:


This one works aswell:


The elFinder is quite handy as it allows drag and drop to upload a bunch of files. Anyway for work I prefer mostly the list view.


posts: 753 United States

You know Torsten, as much as the elFinder interface is pretty cool, I am very partial to the list view myself as well. Thanks for the advice on that as well, I am stilled baffled by the name change in the file directory after the image is uploaded.  It changes the image name to a group of random numbers.

Thanks Torsten!

posts: 1562 Germany

Hi J,

the "group" of random numbers is actually a "hash", which makes it less easy to identify files when the tikiroot/files directory is used and not secured and more important the hash identifies the file across all versions 0> mind: several file versions with the same file name possible (we archive old versions of the same file, whean you upload new versions).

It is a feature, not a bug, but there are indeed use cases where some of us would prefer real name saving (ex when Tiki is ised for document management on localhost etc. and you wanted to use the Tiki file directory besides the operating system - access files directly from sesktop software for exampe.

Maybe we will get that for Tiki 15 (I hope)

Greets, Torsten

posts: 753 United States

Thanks for that sir, appreciate it again the explanation. Now that I know it's more for security, I am good with it.

Tiki 15, can't wait!

Upcoming Events

Tiki birthday
2)  19 Oct 2023 14:00 GMT-0000
Tiki Roundtable Meeting - October
3)  16 Nov 2023 14:00 GMT-0000
Tiki Roundtable Meeting - November
4)  21 Dec 2023 14:00 GMT-0000
Tiki Roundtable Meeting - December
5)  18 Jan 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  15 Feb 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  21 Mar 2024 14:00 GMT-0000
Tiki Roundtable Meeting
8)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting