Controls: show

Document

Comments:

[log in] or [register] to leave a comment for this document.


Go to: all documents

Options: show

Contact:

mail@musterdb.net

Website:

[home] [about] [help]

Subsites:
Members:

[profiles] [forum]

Document

Uploading Files

14-Nov-2012 [20]

Part of Documentation

Basics

Authorized users (Authors and above) can upload pictures and document files by creating file records.

File Specifications

By default 

  • max image file size is 2M, and of types: jpg, jpeg, gif, png
  • max document file size is 10M, and of types: pdf, doc, xls, xlsx, odt, ods, fodt, fods

The default file size maximums, and legal file extensions can be changed (by the Webmaster) by copying
common/modules/musterbase/config/filer.php
to
appication/config/filer.php
and modifying the appropriate values.

Embedded blanks in uploaded file names are automatically converted to underscores("_") to avoid markup parsing issues.

Uploading pictures causes the system to generate several picture size versions -- largest, larger, large, medium, small, smaller, smallest, thumbnail -- causing 9 file size versions (including the original) to exist on the server for immediate access. However only versions that are equal in width or narrower than the original are generated. The generated versions are named <originalfilename>.<filesize>.<extension> (for example mypicture.small.png. The original file name remains unchanged.

The widths applied to the picture file versions are taken from the system property PictureSizes which is accessible to the Webmaster. The default widths are (in pixels): "largest":640, "larger":600, "large":400, "medium":300, "small":200, "smaller":150, "smallest":100, "thumbnail":50. We find that it is best to upload picture files of 0.75M - 1.5M in size.

The larger version of uploaded pictures is displayed in a picture record by default.

pdf document file type previews are displayed as part of the document file record.

Uploading Individual Files

To upload a file:

  1. create a Picture or Document File record (by clicking on Add a <recordtype> button on the record type list for that record) for a new upload
  2. click on toggle input options to reveal all input fields
  3. select a Directory (see Creating Repositories for details on creating repositories and directories)
  4. leave the Filename field blank unless you want the uploaded version to have a different name than the source file
  5. click on the upload file link beside the Filename field
  6. click on the Choose File button to browse to and select the source file

Options:

  • check replace existing if you are uploading a file to replace the existing file for the record. Be sure to clear the Filename field in this case if you want the name of the newly uploaded file to remain unchanged for the upload. If you do not clear the Filename field, then the name of the newly uploaded file will be changed to the file name in the Filename field.
  • for pictures, you can upload a specific version by selecting a version other than original in the drop-down field. This can be useful, for example, to upload a cropped view of the picture for a thumbnail. When original is selected (the default), all file versions are created on upload by default.
  1. click on the Upload button to upload the file.

You will be returned to edit mode with messages indicating the results of the operation.

On upload, file record field values are saved before uploading commences.

If an error is encountered in field values (such as an empty Title), then the upload fails.

For pictures, instead of uploading, you can choose to (Re-)create versions of the picture if you want to over-write custom versions that had been uploaded.

If you have re-uploaded a file of the same name as the original (say a picture that has been rotated by 90°) then your browser may continue to show the old picture in its cache for a while.

Annotating Files

To annotate uploaded files, fill in the fields available in the file record. In this case the markup fields are called Commentary as they are considered commentary on the uploaded files.

Tip: Set the date of the record to the date of the file being uploaded, if appropriate.

Referencing Files in Markup

Link to a file record (picture or document file) the same as other records, in particular
[[Node:<recordnumber>|+|+]] (substituting the actual recordnumber). Also
[[Picture:<recordnumber>|text]] for pictures, or [[File:<recordnumber>|text]] for document files, will work.

To include the actual picture in text, you can use {{Picture:<recordnumber>`medium)}}. Note the version selector after the backtick (after the recordnumber).

Easiest of all is to paste the record number into markup, highlight that number, and hit one of the appropriate markup helper buttons to surround the record number with the correct markup.

Batch Uploads

Muster Wiki Administrators have direct access to a specialized system container type called Directory which is a sort of window into the repositories (server operating system directories) that hold the uploaded files. The directories have the same title as the repositories, and in turn the disk directories.

To upload a batch of files to a directory, navigate to that directory (through the library resources page, to the directories list), select the target directory for the uploads, and click on the actions link near the top left of the directory contents list.

  1. click on the upload link on the actions toolbar.
  2. click on Choose Files to browse to and select files (max 20, although probably less -- 8 - 10 -- for pictures since they need special processing, depending on your server's settings).
  3. select options (replace existing, generate versions..., do NOT generate records...).
  4. click on Upload Files

The upload process will upload the files, and create a record for each uploaded file, with the filename in the title field, and the file date in the date field. The records will be unpublished.

Typically, you would add the new records to a folder, annotate them (particularly replace the Title), and publish them.