diff options
author | Andrey Andreev <narf@devilix.net> | 2014-02-21 14:01:48 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-02-21 14:01:48 +0100 |
commit | 2cf4c9bac558e978d376ef80c4f515d829706c4c (patch) | |
tree | de8c74fc3b7daeaee77a7edc89bb50d9a02dad7d /user_guide_src/source/libraries | |
parent | 344cf8061701aba9a2f43798fda11877053f7560 (diff) |
CI_Upload changes
- Method chaining support.
- A more abstract resetting of the default settings.
- Added an option to initialize() to disable resetting to default settings.
- Removed method mimes_types() and slightly optimized chunks of code where it was used.
- Added the ability to pass allowed_types as an array.
Diffstat (limited to 'user_guide_src/source/libraries')
-rw-r--r-- | user_guide_src/source/libraries/file_uploading.rst | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/user_guide_src/source/libraries/file_uploading.rst b/user_guide_src/source/libraries/file_uploading.rst index d7ba3a6c1..d93acb842 100644 --- a/user_guide_src/source/libraries/file_uploading.rst +++ b/user_guide_src/source/libraries/file_uploading.rst @@ -201,7 +201,7 @@ Preference Default Value Options Descripti directory must be writable and the path can be absolute or relative. **allowed_types** None None The mime types corresponding to the types of files you allow to be uploaded. Usually the file extension can be used as the mime type. - Separate multiple types with a pipe. + Can be either an array or a pipe-separated string. **file_name** None Desired file name If set CodeIgniter will rename the uploaded file to this name. The extension provided in the file name must also be an allowed file type. If no extension is provided in the original file_name will be used. @@ -254,6 +254,13 @@ Class Reference .. class:: CI_Upload + .. method:: initialize([array $config = array()[, $reset = TRUE]]) + + :param array $config: Preferences + :param bool $reset: Whether to reset preferences (that are not provided in $config) to their defaults + :returns: CI_Upload instance (method chaining) + :rtype: CI_Upload + .. method:: do_upload([$field = 'userfile']) :param string $field: Name of the form field |