Multiple Image upload problem on hook on_after_post

edited July 2012 in News & Announcements
I am using fuel version 1 from github.
I have following problems:
1. the file upload path is not uploading on given path:

$upload_image_path = assets_server_path($CI->fuel->settings->get(MY_MODULE, 'asset_upload_path'));
$fields['photographs'] = array('label' => 'Photographs', 'class' => 'multifile', 'type' => 'file', 'upload_path' => $upload_image_path);
here the image is uploaded to assets_server_path() not my custom path. The path is correct I have checked.

2. after uploading data I want to manipulate the uploaded data. for this I am using on_after_post hook.
here I have codes as so:
function on_after_post($values){
$CI =& get_instance();

$data = $CI->upload->data();
on the above code only one image data is displayed and shows the following errors:

Severity: Notice

Message: Undefined variable: field_name

Filename: controllers/module.php

Line Number: 1858
The error repeat = uploaded images number.


  • edited 6:49AM
    Is that folder writable by PHP?
  • edited 6:49AM
    I think I found the issue and posted a fix.
  • edited 6:49AM
    got the fix. Still some issues.
    gives data for one image only while I am uploading multiple images.
  • edited 6:49AM
    I found the user_guide for v 1 and solved it with this:
Sign In or Register to comment.