Fullscreen
[Show/Hide Right Column]




Admin Access

To access administration, go to Home Page and, on the Menu, click on "Admin (click!)".

Activate the feature


To use file galleries, first you must activate the feature. Admin>Home>Features.


File galleries

Image File galleries


From the Tiki Admin Panel, click the File galleries icon to display its settings panel, the top of which appears like so:

Clicking the File Galleries icon on the Admin Panel (see TikiAdminSettings ) takes you to the File Galleries settings.

Image


This panel is almost identical to the image galleries panel. Select the home file gallery, the comment settings for file galleries and if rankings/comments are used or not for file galleries.

There's an important setting for the file galleries: the storage strategy for files. You can choose one of two options to store file gallery files:
  • Store files on the database
  • Store files on a directory

The differences and settings needed for each option are explained below:

Storing files on the database


If you decide to store files on the database then each file data will be stored on a database column (field) this has the following advantages and disadvantages:
  • You don't need to configure anything else.
  • You may have problems if you plan to store large files
  • The database can grow a lot making more difficult to make backups/dumps

Storing files on a directory


If you decide to store files on a directory you must indicate the path to a directory where you will store files. The directory can be absolute or relative to the Tiki directory for example:
files/
/www/tiki/files/
/home/tiki/files/
files/uploads/
can be configured as directories.
Before 1.8.1, ending "/" was mandatory.

Storing files on a directory has the following advantages and disadvantages
  • You must configure properly a directory to store files (chmod 777 for folders/directories, chmod 644 for files. Otherwise you will get error like "I/O error", "server error" or "error 401")
  • You can upload files of any size (if you have space)

You must ensure that:
  • The configured directory exists and PHP (Apache) can read/write it
  • For security, only Tiki can read or access the contents of that directory. Do that with one of the two following options.
    [+]

You may need to ask your ISP/hosting service for an upload strategy and instructions if the ISP/hosting allows uploads (some PHP's have file uploads disabled for unknown reasons, maybe to prevent disk space consuming). Since Tiki can be configured to store fles on the database or a directory if there's a way to handle uploads then Tiki can use it :-) choose the strategy that is best for you.

Move files between them

Since Tiki5 (and backported to Tiki4.2) you can move the file in the database to the file system and the other way round, which is very helpful when migrating a tiki from one hosting to another one, for instance.

Quota

tw >=4
It is possible to limit the volume that is uploaded to all the file galleries or a specific file gallery. A quota to a file gallery applies to this file gallery and all the file galleries under it.
As soon as the limit is reached not other files can be uploaded. The user will see an error message that the quota is reached. A mail can be sent via the Mail notifications feature.

tw >=5
The objects where a file is used (through the plugin IMG, FILE, link containing tiki-download_file.php , dl, preview, thumbnail, thumb, display) are collected. Be careful, the list can not be complete (For instance, reference to a file in the layout is not collected).
When you want to delete a file, a warning is posted if the file is still in used.
If you check in 'edit->file gallery' 'Perms of the backlinks are checked to view a file', the permission checking will be changed. If you see on object that uses a file located in a gallery you can not see, you will be able to see the file. You will be able to download a file that is used in at least one object you can see.

Parameters for images

Since Tiki6, there are a few parameters related to set the maximum size for width and height of images once uploaded to that file gallery, as well as the default syntax to be added in the wiki page (or any other textarea) when the user selects on image from a file gallery through the image buttons in the toolbar at the wiki edit page.

Click to enlarge
Click to enlarge


Filtering file uploads


You can set up filters for filenames so filenames will be checked and maybe rejected depending on their filenames. Filters are regular expressions perl-like without the // delimiters.

Filename must match


A regular expression that must be matched to accept the file example [A-Za-z]* (filename can only have a-z letters)

For example, if you want to require that uploads must have a wordprocessing file extension, you could enter .*\.(odt|sxw|doc|dot|rtf|wpt|frm|wpd|txt|ODT|SXW|DOC|DOT|RTF|WPT|FRM|WPD|TXT)

Filename must not match


A regular expression that if matched rejects the file, example \.gif (rejects gif images note that the period must be escaped since we are using regular expressions) If you don't know anything about regular expressions just leave the fields blank and all the files will be accepted.

File galleries search indexing


Please see Search within files

Automatic deletion of old files

tw >=5.0
If you check this feature, the user will be able to say after how much time his file can be deleted automatically after the last file update
When the file will be deleted a mail to emails will be automatically sent with the deleted file attached. The emails are comma sperated email.
in order to have this feature working you must step up a cron job.
Create a file like that in tiki root
<?php
include_once('tiki-setup.php');
if ($prefs['fgal_delete_after'] == 'y') {
	global $filegallib; include_once ('lib/filegals/filegallib.php');
	$filegallib->deleteOldFiles();
}


Fix mime types based on file suffix

Under some conditions (combination of browser, web server, upload method), uploaded files get the mime type application/octet-stream instead of image/*. When activating this setting, the suffix of the uploaded file name will be used to override the mime type application/octet-stream. The following suffixes are recognized (case insensitive):
  • .jpeg and .jpg will set image/jpeg
  • .png will set image/png
  • .gif will set image/gif
  • .tif and .tiff will set image/tiff
  • .pdf will set application/pdf
  • .svg will set image/svg+xml

Admin view

Administrateur can use an admin view of the file galleries.
This view has its own column display settings. All in the file gallery and its sub-filegalleries are displayed. The explorer is automatically hidden. In this view additional filtering are possible:
  • Not modified since
  • Not downloaded since
  • Orphans will shows only files taht are not referenced. Careful: this feature is not perfect, some links can miss

User parameters

tw >=6.1 - from this version the various labels used to describe who has done what have been updated.

When setting what is displayed for either the general user or the system Admin the following options are available:
  • Created/Uploaded: displays the date the item was originally added to the File Gallery
  • Uploaded by: displays the user that uploaded the latest version of the file
  • Last Modified by: displays the user who last updated any of the file's Properties or uploaded a new version
  • Last Modified: displays the date that the last modification took place
  • Creator: displays the original creator of the file
The display column 'Creator' should only be used if the feature_file_galleries_author preference is set 'on'. This option then allows a text field to be used to capture a description of the creator of the file, if different from the 'Uploaded by' user - where this text is not automatically changed when a new version is uploaded. Please note that this preference is currently somewhat ambiguously labelled "Require file author's name for anonymous uploads" in the File Gallery admin screen

Setting the maximum upload size


Podcast

This type of files allows to have file directly accessible from an url
ex: http://mysite.com/podcast/1233243234234.mp3
In a regular file gallery, the files can be accessed with
ex: http://mysite.com/tiki-download_file.php?fileId=1
By preserving the extension, the file can be directly used in the rsspodcast and for podcast players


Trouble shooting

  • When you download a file, you get an invalid file. In linux you can check if the file is correct and do not contain error messages with hexdump -C your_file


Alias
File Galleries Config

Contributors to this page: cdrwhite2908 points  , Leu672 points  , Marc Laporte9138 points  , Jean-François B.1662 points  , Geoff Brickell743 points  , xavi67871 points  , ngerhart5 points  , sylvie7387 points  , Jürgen Heckes473 points  , Ed20929 points  , luciash d' being2160 points  , awolff107 points  , mlpvolt4388 points  , Scot Wilcoxon684 points  , dthacker1483 points  , Bill White12 points  , Marc Fargas5 points  , , xavidp1213 points  , Gary7 points  , Michael Davey15 points  , magius7 points  , Mose96 points  and system .
Page last modified on Friday 09 March, 2012 01:45:22 UTC by cdrwhite2908 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki

Show php error messages
 
PHP (5.3.5-1ubuntu7.8) ERROR (E_WARNING):
File: lib/images/abstract.php
Line: 231
Type: getimagesize(dl348) [function.getimagesize]: failed to open stream: No such file or directory