I solved my own problem following the code in one of the Codeigniter Forks of this Blueimp plugin.
The problem was the URL of the DELETE HTTP/AJAX request that the Blueimp plugin specifies by default. Those URLs correspond to a directory path of where the file is uploaded. Unfortunately, Codeigniter by default overrides this by using the URL to determine what controller/controller_method to call.
So for example, my directory structure for the uploaded file is this:
/uploads/img1.jpg
and Codeigniter looked for a controller called uploads and a method called img1.jpg but those obviously didn't exist.
I solved this by changing the Blueimp plugin "upload.class.php" file delete_url that gets assigned to each file. The delete_url was changed from a directory location to a codeigniter controller/controller_method as follows:
protected function set_file_delete_url($file) {
$file->delete_url = base_url().'upload/deleteFile/'.rawurlencode($file->name);
//"upload/deleteFile is my controller/controller_method
//$file->delete_url = $this->options['upload_url']
// .'?file='.rawurlencode($file->name);*/
//.....
and then here is what my upload/deleteFile function looks like (again following the code nearly verbatim in the Codeigniter Blueimp Fork):
function deleteFile($file){
$fcpath=FCPATH.'uploads/;
$success =unlink($fcpath.$file); //PHP function was does the actual file deletion
//info to see if it is doing what it is supposed to
$info->sucess =$success;
$info->file =is_file(FCPATH .$file);
$info->fcpath = FCPATH;
if (IS_AJAX) {
//I don't think it matters if this is set but good for error checking in the console/firebug
echo json_encode(array($info));
}
else {
//here you will need to decide what you want to show for a successful delete
$file_data['delete_data'] = $file;
$this->load->view('admin/delete_success', $file_data);
}
}
<limit>directive somewhere. Just because it works in one place but not another doesn't mean much - apache allows overrides on all sorts of levels - per vhost, per dir, per url, blah blah blah.<limit>directive? I'm not familiar with that.