Wiki attachments must first be enabled at tiki-admin.php?page=wiki&cookietab=2&highlight=feature_wiki_attachments .
For user groups to be able to view and attach files, the permissions wiki_view_attachments, and wiki_attach_files must be assigned to at least one of the Groups the user is a member of.
These two permissions allow the viewing and uploading of attachments. By default, deleting an attached file is only possible for the one who uploaded the file or for site administrators. A global ability to delete attachments can be granted to a group if the permission tiki_p_wiki_admin_attachments is assigned to the group.
There are two ways to store Wiki attachments files in Tiki:
- Using the database (Old attached file storage system)
- Using file galleries (Wiki attachments will be stored in the file gallery. This is the preferred way to store attachments starting Tiki 26+)
You can switch from one storage system to another while importing files from one system to another using the following console command:
php console.php attachments:migrate
This migration tool is a two-way tool - can convert legacy attachments to files in galleries and vice-verse
Note that the usual way to migrate is from old attachments to file galleries. To do this, make sure that the
feature_use_fgal_for_wiki_attachments preference is turned on.
Otherwise when moving files to legacy storage, you will need to manually update the associated wiki pages. Files from file galleries are replaced in wiki attachments and provide a table with mappings at the end with: file ID, file name, attachment ID, so users can override their uses manually
When migrating from the old system (legacy storage) to the file galleries, wiki attachments are migrated to file galleries as db records and file contents are migrated to proper place (depending on how file galleries store files - db or disk). A special file gallery for wiki attachments with ID 3 is used to store these attached files.
We will replace plugin file, img, etc. references to attachments with file IDs, so we keep the same plugins but might change their parameters.