How to Upload Images with the File Uploading Class in PHP CodeIgniter


show more Uploading images with the File Uploading class provides you with in-depth training on Developer. Taught by Jon Peck as part of the Up and Running with PHP CodeIgniter show less
please wait ...

Uploading images with the File Uploading class

File uploads can be a pain, but CodeIgniter tries to eliminate some of the more obnoxious parts using the file uploading class which is especially helpful for images. File uploads consist of the following process. First, the file form element is displayed to the user. Then, the form is submitted and the file is uploaded. Based on file upload preferences such as image height, width or maximum size, the file is validated. When validation is past, the file metadata is available for use. I'm going to allow users to upload cover images of the back issues. First, switch to a terminal and navigate to the root directory of your CodeIgniter installation, verify that you're in the right place. Next, make a directory that you can use to upload files to. Mkdir, space, upload.

Next, set the permissions on that directory. Chmod 755 is a best practice. In a worst-case scenario, use 777 but this is almost never necessary and not recommended, as it's a big security risk. Now that the designation exists, I...

Uploading images with the File Uploading class
Video duration: 6m 36s 1h 30m Intermediate

Viewers:

Uploading images with the File Uploading class provides you with in-depth training on Developer. Taught by Jon Peck as part of the Up and Running with PHP CodeIgniter

Subject:
Developer
Software:
PHP CodeIgniter
Author:
please wait ...