How to Integrate Uploadify With Codeigniter

Googling around I've found several solutions, but not to my liking some even suggest to edit the fla. Well there's no problem with that if you want to. The problem with the uploadify.swf is that if uploads the file relative to the .swf location. So I've come up with a simple yet effective solution. 1.) Open the uploadify.php
//normally it should be like this:
$targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
$targetFile =  str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
$targetFile = $_REQUEST["folder"] . $_FILES['Filedata']['name'];

//just change it to:
$targetFile = getcwd();
Or set $targetFile to any directory of your liking.

1 Comments

Post a Comment

Post a Comment

Previous Post Next Post
NERV Open Source
Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.