From e334c472fb4be44feec3a73402fc4a2b062cbfc0 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 21 Oct 2006 19:44:22 +0000 Subject: --- user_guide/libraries/file_uploading.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'user_guide/libraries/file_uploading.html') diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html index 390b45375..730dd0545 100644 --- a/user_guide/libraries/file_uploading.html +++ b/user_guide/libraries/file_uploading.html @@ -12,7 +12,7 @@ @@ -63,7 +63,7 @@ File Uploading Class

File Uploading Class

-

Code Igniter's File Uploading Class permits files to be uploaded. You can set various +

Code Igniter's File Uploading Class permits files to be uploaded. You can set various preferences, restricting the type and size of the files.

@@ -110,7 +110,7 @@ folder:

-

You'll notice we are using a form helper to create the opening form tag. File uploads require a multipart form, so the helper +

You'll notice we are using a form helper to create the opening form tag. File uploads require a multipart form, so the helper creates the proper syntax for you. You'll also notice we have an $error variable. This is so we can show error messages in the event the user does something wrong.

@@ -165,7 +165,7 @@ class Upload extends Controller { { $this->load->library('upload'); - $config['upload_path'] = './uploads/'; + $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '100'; $config['max_width'] = '1024'; @@ -202,7 +202,7 @@ class Upload extends Controller { www.your-site.com/index.php/upload/ -

You should see an upload form. Try uploading an image file (either a jpg, gif, or png). If the path in your +

You should see an upload form. Try uploading an image file (either a jpg, gif, or png). If the path in your controller is correct it should work.

@@ -221,7 +221,7 @@ controller is correct it should work.

Setting Preferences

-

Similar to other libraries, you'll control what is allowed to be upload based on your preferences. In the controller you +

Similar to other libraries, you'll control what is allowed to be upload based on your preferences. In the controller you built above you set the following preferences:

$config['upload_path'] = './uploads/';
@@ -323,7 +323,7 @@ will NOT need to use the $this->upload->initialize function if you sa

$this->upload->do_upload()

-

Performs the upload based on the preferences you've set. Note: By default the upload routine expects the file to come from a form field +

Performs the upload based on the preferences you've set. Note: By default the upload routine expects the file to come from a form field called userfile, and the form must be a "multipart type:

<form method="post" action="some_action" enctype="multipart/form-data" /> @@ -347,7 +347,7 @@ returns the data so you can assign it however you need.

$this->upload->data()

-

This is a helper function that returns an array containing all of the data related to the file you uploaded. +

This is a helper function that returns an array containing all of the data related to the file you uploaded. Here is the array prototype:

Array
-- cgit v1.2.3-24-g4f1b