File
The File extension is intended to place an upload control within your Publish form just like you would a Text field or Drop-down List. Once enabled you will have the ability to create a new custom field of type File and associate it with an EE upload location.

Installation
- Upload
ext.mh_file_ext.php to your system/extensions directory
- Upload
lang.mh_file_ext.php to your system/lang/english directory
- Upload
icons to your images directory
- In EE Navigate to the Admin » Utilities » Extensions Manager and Enable Extensions,
if you haven’t already.
- Enable the File extension
- Create a new custom field by navigating to Admin » Weblog Administration » Custom Weblog Fields and choose
File from the Field Type drop down
Configuration
There are several configuration options available. They are set within the Upload Location’s preferences. To change them navigate to Admin » Weblog Administration » File Upload Preferences. These settings are unique to each upload location making it possible to configure individual custom fields with unique thumbnail sizes or display options.

Control Panel Settings
- Allow Multiple? [yes/no] — When set to
yes the field will grow as files are uploaded. With JavaScript enabled this will happen in real time, without JavaScript this will happen on page refreshes.
- Show Thumbnails? [yes/no] — When set to
yes a thumbnail of the uploaded file (if available) will be shown within the Publish page. If not available, or set to no an appropriate icon will be shown instead.
File Settings
- Clean Filenames? [yes/no] — When set to
yes files will be renamed to exclude spaces.
- Rewrite Filenames? [yes/no] — When set to
yes uploaded files will be renamed to a unique string.
- Resize Images? [auto/crop/anchor_width/anchor_height/stretch/no] — Controls how images are resized (if at all).
- Auto — Requires Max Width & Max Height. Will fit the uploaded image within the size specified by Max With and Max height.
- Crop — Requires Max Width & Max Height. Will crop the image, to the center, at the size specified by Max With and Max height.
- Anchor_width — Requires Max Width. Will resize the image to the size specified by Max Width adjusting the height to keep the aspect ratio.
- Anchor_height — Requires Max Height. Will resize the image to the size specified by Max Height adjusting the width to keep the aspect ratio.
- Stretch — Will force the image to resize to the size specified in Max Width and Max Height even if it is the wrong aspect ratio.
- Do Not Resize — Will not resize the uploaded image at all.
- Keep Originals? [yes/no] — If resizing an image and set to
no the original files will be deleted, leaving only the resized image on the server.
- Delete From Server? [yes/no] — If set to
no removing an image from the control panel will not remove the file from the server.
{images backspace="6"}
{if file_path}{file_path}<br />{/if}
{if file_thumb_path}{file_thumb_path}<br />{/if}
{/images}
Parameters
- backspace [Number] — Just like the regular backspace function.
Single Variables
- {[custom_field]} — When used alone, the custom field will output the first uploaded image
Variable Pairs
- {[custom_field]}…{/[custom_field]} — When used as a pair the contained code will loop, outputting all the uploaded files.
- count — Numeric number of each file
- total_results — Total number of files uploaded to the custom field
- file_name — Filename of the uploaded file.
- file_url — URL to the uploaded file.
- file_thumb_name — Filename of the uploaded thumbnail.
- file_thumb_url — URL to the uploaded thumbnail.
Download
Support (kind of)
Try the EE forum, it’s the best way to reach me!