File Galleries User

The file galleries section of Tiki is a download manager, you can create/edit file galleries which are collections of files, you can define with the permission system who can create file galleries, upload files and download files. Statistics are recorded for each download, rankings where defined for the top downloaded files, most visited file galleries and last uploaded files. Modules are also available to display last changed file galleries, last uploaded files, top downloaded files and top visited file galleries.

You can use file galleries to distribute free multimedia (mp3, avis, etc), to distribute software (versions, patches, releases), to add files that users can download from Wiki pages, articles or weblog posts, etc.


If you enable the file galleries section from the admin menu you' ll see a menu section in the main menu for file galleries. From the menu according to the permissions you have you will be able to list existing file galleries (where you can create a new gallery) or upload a file to a gallery.

A file gallery is just a collection of files that can be downloaded or displayed, files are kept in the Tiki database or in a directory and the number of downloads for each file are registered.

The List galleries option in the main menu will take you to the following screen:

Listing File Galleries

File Gallery listing
Old File Gallery listing

From this screen you can create a new gallery, edit existing galleries, remove existing galleries, upload a file to a gallery or list the contents (files) of an existing gallery. The options you see as a user depend on the permissions the admins have set for your groups.

Creating file galleries

To create a new file gallery click the create new gallery link and the following form will be displayed.

edit file gallery screenshot
Tiki 12.x screenshot

The same form is displayed to edit an existing gallery, you have to fill the gallery name and a description.

You can make a gallery invisible to normal users by unchecking the "Gallery is visible to non-admin users" checkbox. This can be used to set-up galleries that cannot be browsed but contain files that you will make available for downloading in your site using direct links to download the file.

If you want to allow uploads to this gallery from other users check the "Gallery is unlocked" checkbox. If the checkbox is not checked then only the gallery owner (or admins) can upload files to the gallery.

Uploading files

To upload a file you use the following form:


In this form you enter a title and description for the file, the gallery where the file will be stored and then the file from your local disk to upload. If everything goes well you will see a message indicating that the file was uploaded.


 Bug in Tiki 5.0
In Tiki 5.0, if you have specified that files are stored in the database rather than the file system, and if you can upload files but uploaded image files don't display correctly, try commenting out the last line of the file db/local.php. This bug will be corrected in the next release.

Access to the file in the gallery

Link to the file using Wiki syntax (substitue in fileId=x: x = the fileId number):

[tiki-download_file.php?fileId=x|file name that you want to display]

Imbed an image

{img src="tiki-download_file.php?fileId=x&thumbnail=y" link="tiki-download_file.php?fileId=x" alt="alternate file name"}

Link to the file using html syntax

<a href="tiki-download_file.php?fileId=x">file name </a>

Batch uploads

(click to expand) Batch Upload Bug in 4.0 and 4.1

There are essentially three ways to upload multiple files using the file gallery (not image gallery) feature...

  1. Use the standard upload interface's "Add" button and add multiple files one at a time
  2. Upload a flattened (no nested directories) zip file and check the "Unzip zip files" checkbox
  3. Enable "Directory Batch Uploading" using Tiki's Admin Panel (tiki-admin.php) for the "File Galleries" feature (this may be visible only if checkbox experimental is active, as in Tiki 9.1).

As of 4.0 and 4.1...

The "upload multiple files one-at-a-time" (#1 above) feature still works on CentOS, but not on Windows XP.

The "upload and unzip zip file" feature (#2 above) is broken for Tikis installed on CentOS (likely all Linux versions) and on Windows XP.

The bug seems to be connected to a new file quota feature. A more detailed description can be found here: Batch-Upload Bug Reported Here

This bug exists whether or not the user chooses to store the files in the MySQL database or in a system file directory.

If you have the right permission to batch file uploads then you will be able to make a batch upload of files by uploading a .zip file to the gallery and checking the batch-upload checkbox (if you don't check it the zip is uploaded as a single file).

Note that you must only give batch uploading permissions to admin since if users can make batch uploads the results can be unpredictable.
Note that you can use the Batch uploads only when you don't use the database to store the content of the files!

Tiki does not unzip files in the subdirectories of the zip.

Troubleshooting File Uploads

If an upload is failing, especially if it is a large file, try the steps found on Why File Uploads May Fail.

Replace Files or Upload New Version

When browsing a file gallery, one of the actions available when you click on the Image icon for a file (assuming you have permission), is to either Image Replace or Image Upload New Version. Which one of these options appears depends on your settings for that gallery. This and the difference between the two options are explained below:

  • Replace: Means that the current file will be replaced with the new file you have chosen and the old file will be deleted. Within the gallery you are working on, click on the Edit Gallery button (available if you have permission) and set Maximum number of archives for each file to 0 to use this option.
  • Upload New Version: Means that the old file will be archived when the new file is uploaded. Within the gallery you are working on, click on the Edit Gallery button (available if you have permission) and set Maximum number of archives for each file to the number of archives you wish to allow or to -1 to allow unlimited archives.
    The archived files are also available under the Image icon under the Image Archives option.

Whether or not the ID number for the file stays the same or is incremented depends on the setting at Admin Home -> File Galleries. Check the Keep fileId for archives to maintain the same file ID. If unchecked, the new file will receive a new auto-incremented ID number.

Listing file galleries and downloading files

Once you have some files uploaded to the gallery you can visit the gallery from the gallery listing menu and see the uploaded files:


From this screen you will see the gallery description and the files uploaded to this gallery (the number of files per page varies), you can order the list by any of the columns in the listing. Clicking the get link in the actions column will download the file to your local disk.


The following permissions can be set for the file galleries section:


The tiki_p_admin_file_galleries is a master permission that automatically includes the other permissions.

List Slides