Fullscreen
[Show/Hide Right Column]

General Settings tab

Related Topics

Overview
Use this tab to select the home file gallery, the comment settings for file galleries and if rankings/comments are used or not for file galleries.

To Access
From the File Gallery Admin page, click the General Settings tab.

Note
In Tiki 3 (and earlier), all File Gallery options were on a single tab.
Use this tab to specify if files are stored in the database or a file directory. See this important information.

8.x
File Galleries, General Settings tab
File Galleries, General Settings tab

Setting Description Default
Home File Gallery Select the main (default) file gallery
Storage Specify if uploaded files should be stored in the Database or Directory Database
Podcast directory files/
Features
Rankings If enabled, users can view the "top" or "most" downloaded files.
File Gallery Comments If enabled, users can post comments on file galleries
Display ZIP option in gallery If enabled, users can upload a ZIP (archive file). Tiki will automatically un-ZIP the archive and add each file to the gallery.
WebDAV access to Tiki
Draw (SVG-edit)
Docs (WebODF)
Allow download limit per file
Prevent download if score become negative If using Tiki Score system, users with a negative score cannot download files.
Allow same file to be uploaded more than once Yes, even if in same directory
Batch uploading
Require file author's name for anonymous uploads
Automatic deletion of old files
Keep field for archives
Use file galleries for user files
Use file galleries for wiki attachments If enabled, wiki attachments will be stored in the file gallery
Save files as drafts
File Galleries configuration templates
Upload progress bar None
Upload files from remote source If enabled, you add files to the File Gallery from an external URL source.
Allow searching for exiting files in the tracker files field Enabled
Quota
Quota for fall files and archives 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. Use 0 for no quota.
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.
This feature was introduced in Tiki4.
0MB
Quota can be defined for each file gallery If enabled, you can define a different quota for each file gallery
Upload Regex
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)
Cannot 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.

7.x
SCREEN SHOT, thumbnail at 300px

Setting Description Default
Home File Gallery
Storage Database
Podcast directory files/
Features
Rankings
File Gallery Comments
Display ZIP option in gallery
Allow download limit per file
Prevent download if score become negative
Allow same file to be uploaded more than once Yes, even if in same directory
Batch uploading
Require file author's name for anonymous uploads
Automatic deletion of old files
Keep field for archives
Use file galleries for user files
Upload progress bar None
Quota
Quota for fall files and archives 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. Use 0 for no quota.
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.
This feature was introduced in Tiki4.
0MB
Quota can be defined for each file gallery If enabled, you can define a different quota for each file gallery
Upload Regex
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)
Cannot 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.

3.x

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.
{FANCYTABLE}






Storing Files in Database or File Directory

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
  • 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 files 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.

Contributors to this page: Leu672 points  and Rick22958 points  .
Page last modified on Tuesday 27 December, 2011 12:41:39 UTC by Leu672 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