summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries/file_uploading.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-05 21:45:41 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-05 21:45:41 +0200
commit5b5021812ea6dc859312e00b6b0f078eea54c88d (patch)
tree0a8840ee0429cc405cb597438a73d03bca970c1a /user_guide_src/source/libraries/file_uploading.rst
parent49d08053257b55db511eaca08b8ab5d12149f3b6 (diff)
parentdbad54e09a39a77c7404dee9ca1a6b34299469d0 (diff)
Merge upstream branch
Diffstat (limited to 'user_guide_src/source/libraries/file_uploading.rst')
-rw-r--r--user_guide_src/source/libraries/file_uploading.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/user_guide_src/source/libraries/file_uploading.rst b/user_guide_src/source/libraries/file_uploading.rst
index d573fc770..1698dcbb9 100644
--- a/user_guide_src/source/libraries/file_uploading.rst
+++ b/user_guide_src/source/libraries/file_uploading.rst
@@ -197,6 +197,7 @@ Preference Default Value Options Descripti
Separate multiple types with a pipe.
**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.
**overwrite** FALSE TRUE/FALSE (boolean) If set to true, if a file with the same name as the one you are
uploading exists, it will be overwritten. If set to false, a number will
be appended to the filename if another with the same name exists.
@@ -215,6 +216,9 @@ Preference Default Value Options Descripti
that can not be discerned by the person uploading it.
**remove_spaces** TRUE TRUE/FALSE (boolean) If set to TRUE, any spaces in the file name will be converted to
underscores. This is recommended.
+**detect_mime** TRUE TRUE/FALSE (boolean) If set to TRUE, a server side detection of the file type will be
+ performed to avoid code injection attacks. DO NOT disable this option
+ unless you have no other option as that would cause a security risk.
============================ ================= ======================= ======================================================================
Setting preferences in a config file
@@ -287,6 +291,10 @@ data related to the file you uploaded. Here is the array prototype::
[image_size_str] => width="800" height="200"
)
+To return one element from the array::
+
+ $this->upload->data('file_name'); // Returns: mypic.jpg
+
Explanation
***********