Automatically Create Directory When Uploading With CodeIgniter

Automatically Create Directory When Uploading with CodeIgniter

CodeIgniter does not automatically create a directory when uploading a file to a non-existent directory. There are some work around by handling it in controller when uploading the file, but the easiest way is to extend CI_Upload library. Harrison Emmanuel (Eharry.me) came up with a library to extend CI_Upload. Be sure to check his github gist. How To Use To use this library, you can create MY_Upload.php under your application/libraries folder and use the following code. libraries/MY_Upload.php [crayon-66233971b2017488268882/] And it’s done. You

Continue Reading

Rotating iOS Photo Correctly using CodeIgniter’s Image_lib

I have an issue with iOS Photo recently not being displayed properly after uploading. After googling around, I’ve managed to found a workaround for this issue. Imagine this scenario: You have a working website with file uploader and then strange phenomenon happens when you upload a photo from iPhone in portrait. The photo is uploaded properly, but the orientation is landscape. What is the problem with iOS Photo? The problem was that image rotation was added to the photo as EXIF

Continue Reading

Sliding Sidebar