Loading...
 
Skip to main content

Files Tracker Field

Introduced in Tiki8, it allows drag-and-drop of files into this tracker field if the browser is HTML5 ready. It is one of many Tracker Field Types.

This field stores the uploaded files into file galleries, which adds all of the management features you would expect, including versioning. The files are being added to the file galleries as they are being uploaded and then attached to the tracker item using a virtual link.

In the event of the tracker item not being saved, the files created will be orphaned. From Tiki12, it is possible to detect those orphan files and manage them using configured actions. The following example allows to create an interface that would list orphan files older than 2 hours in file gallery 4 (presumably where the field uploads the files) and allows to selectively delete those files.

Tiki 12 Orphan Files clean-up
Copy to clipboard
{LISTEXECUTE()} {filter field=gallery_id content=4} {filter field=relation_types multivalue="NOT tiki.file.attach.invert"} {filter range="modification_date" from="2000-01-01" to="2 hours ago"} {ACTION(name="Delete")} {step action=delete} {ACTION} {LISTEXECUTE}


See PluginListExecute for details.

Notes

And according to the http://tiki.org/February+2012+Webinar , it allows also to set a file from a URL (external to Tiki) and have Tiki refresh that file if the source external file changes.

In Tiki9 it allows replacing files instead of just adding them in file galleries.

Options

Options in Tiki12:

Click to expand
Click to expand

MIME Type Filter

Valid values for Tiki 12 are for example image/jpeg to allow only JPG imges or image/* to allow only images of any type.
While image/jpeg|image/png does not limit files that are shown when brosing files for upload, upload only succeeds for those files, whose mime-type is in the pipe separated list.

Maximum image size

width and height can be limited, and the image will be resized before upload, saving bandwidth and diskspace.


Related:


stub