Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

upload.ini [CreateSettings]

The settings of [CreateSettings] in upload.ini: MimeClassMap, MimeUploadHandlerMap, DefaultClass

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/ini-settings/upload/CreateSettings.md

On this page

upload.ini [CreateSettings]

The block [CreateSettings] of settings/upload.ini, with 3 setting(s).

Never edit settings/upload.ini itself: an update replaces it. Put the settings you change in an override, which wins over the shipped file:

  • settings/override/upload.ini.append.php for every siteaccess,
  • settings/siteaccess/<siteaccess>/upload.ini.append.php for one siteaccess,
  • extension/<extension>/settings/upload.ini.append.php in an extension (read when the extension is active).

MimeClassMap

Maps from a mime-type or mime-group to a class identifier

Default: a hash of 7: image=image, video/quicktime=quicktime, video/x-msvideo=windows_media, video/vnd.rn-realvideo=real_video, application/vnd.rn-realmedia=real_video, application/x-shockwave-flash=flash, video/mp4=video.

<?php /* #?ini charset="utf-8"?
# settings/override/upload.ini.append.php
[CreateSettings]
# an empty "MimeClassMap[]" first replaces the shipped list; without it the items are added
MimeClassMap[]
MimeClassMap[image]=image
MimeClassMap[video/quicktime]=quicktime
MimeClassMap[video/x-msvideo]=windows_media
MimeClassMap[video/vnd.rn-realvideo]=real_video
MimeClassMap[application/vnd.rn-realmedia]=real_video
MimeClassMap[application/x-shockwave-flash]=flash
MimeClassMap[video/mp4]=video
*/ ?>

MimeUploadHandlerMap

Maps from MIME-Type to the name of an upload handler
If the handler is found for the given MIME-Type it will be
used instead of the normal attribute based upload.
The syntax is
MimeUploadHandlerMap[<mime-type>]=<handler_identifier>
The <handler_identifier> will be used for the class name as well
as the filename of the PHP file.
The <mime_type> can either be specified by the full MIME-Type like
MimeUploadHandlerMap[image/jpeg]
with just the group
MimeUploadHandlerMap[image]
By using just the group the handler can take care of a whole set of mime-types

Default: an empty list.

<?php /* #?ini charset="utf-8"?
# settings/override/upload.ini.append.php
[CreateSettings]
# an empty "MimeUploadHandlerMap[]" first replaces the shipped list; without it the items are added
MimeUploadHandlerMap[]
*/ ?>

DefaultClass

Example of OpenOffice.org handling
MimeUploadHandlerMap[application/vnd.sun.xml.writer]=ezopenofficeupload
The system will then look for ezopenofficeupload.php
The class for all files that are not recognized.
The default is to use the file class

Default: file.

<?php /* #?ini charset="utf-8"?
# settings/override/upload.ini.append.php
[CreateSettings]
DefaultClass=file
*/ ?>

Generated by ./console exp:help:examples from settings/upload.ini. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x