Issue #4 new

onCompleted function does not receive actual uploaded file name

Samuel Liew
created an issue

When there is another file on the server with same name, ValumsFileUploader appends digits after the file name. This value is passed on to the target [receptorClassName]/[methodName], however, it is not passed back to CocoWidget's onCompleted method.

$this->widget('CocoWidget', 
   array(
      ...,

      'onCompleted' => 'function(id, filename, jsoninfo) {
         // wrong filename if there is duplicate on server!
         console.log(filename);
      }
   )
}

Comments (5)

  1. Samuel Liew reporter

    Temporary workaround:

    'onCompleted' => 'function(id, filename, jsoninfo) {
        // get the actual filename that the server returned
        filename = jsoninfo.filename + "." + jsoninfo.ext;
        console.log(filename);
    }
    
  2. Log in to comment