diff options
author | Derek Allard <derek.allard@ellislab.com> | 2009-02-16 16:44:32 +0100 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2009-02-16 16:44:32 +0100 |
commit | 616dab8bcaffb3ae2c22a51c84314ebe259401d4 (patch) | |
tree | 282a3c64f69b9effdbe1d3d803e7bd9a23688bbf /user_guide | |
parent | d70b064ca3d38115ec53c38528fe7c02a9ddcf97 (diff) |
Added the ability to pass $config['file_name'] for the File Uploading Class and rename the uploaded file.
Diffstat (limited to 'user_guide')
-rw-r--r-- | user_guide/changelog.html | 6 | ||||
-rw-r--r-- | user_guide/libraries/file_uploading.html | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/user_guide/changelog.html b/user_guide/changelog.html index a9eec099c..19d85c073 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -62,11 +62,17 @@ Change Log SVN Revision: </p> <ul> + <li>Libraries + <ul> + <li>Added the ability to pass $config['file_name'] for the <a href="libraries/file_uploading.html">File Uploading Class</a> and rename the uploaded file.</li> + </ul> + </li> <li>Database <ul> <li>Switched from using gettype() in escape() to is_* methods, since future PHP versions might change its output.</li> </ul> </li> + </ul> <h3>Bug fixes for 1.7.2</h3> diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html index 652aaa528..1051dcbb1 100644 --- a/user_guide/libraries/file_uploading.html +++ b/user_guide/libraries/file_uploading.html @@ -260,6 +260,16 @@ $this->upload->initialize($config);</code> <tr> +<td class="td"><strong>file_name</strong></td> +<td class="td">None</td> +<td class="td">Desired file name</td> +<td class="td"> + <p>If set CodeIgniter will rename the uploaded file to this name.</p> + <p class="important"><strong>Note:</strong>The filename should not include a file extension.</p> +</td> +</tr> + +<tr> <td class="td"><strong>overwrite</strong></td> <td class="td">FALSE</td> <td class="td">TRUE/FALSE (boolean)</td> |