type = 'file'

Editable region of type file is primarily used to allow the user to upload a file from his local computer onto the server. The user can also browse and select any of the previously uploaded files.
Once a file has been selected, this editable region then holds a fully qualified URL of the uploaded file.

**NOTE:** By default, all uploaded files will be saved within the _**couch/uploads/file**_ folder (or any subfolders created by the user within it). You can set the location to any other folder by uncommenting entry number 12 (*K\_UPLOAD\_DIR*) in _config.php_ and changing it to the desired location.

``` // 12. // Upload folder if not using the default upload folder within 'couch'. // Should be relative to your site (don't forget to set write permissions on it). define( 'K_UPLOAD_DIR', 'myuploads' ); ```

An editable region of file type can be defined this way -

<cms:editable
  name='my_document'
  label='Downloadable File'
  desc='Upload the file here'
  type='file'
/>

The code above will result in -

Clicking the 'Browse Server' button will bring up a window which can be used to browse previously uploaded files on the server or upload a new file from the local machine.

The contents of this region can be accessed, as with all other editable regions, by using the variable named after it -

<a href="<cms:show my_document />" >Download file</a>

Parameters

Apart from the parameters common to all the other types of editable regions, this type does not accept any other parameter.