Yii Framework Forum: Xupload Extension Using Get Url Error - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Xupload Extension Using Get Url Error Rate Topic: -----

#1 User is offline   jak007 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 07-May 14

Posted 20 June 2014 - 08:41 AM

hlo everybody i am using XUpload (Yii 1.1: XUpload Workflow) extension but in this extension there was no XUploadForm file was given so i am using this form which i given below


<?php
class XUploadForm extends CFormModel
{
public $file;
public $mime_type;
public $size;
public $name;
/**
* Declares the validation rules.
* The rules state that username and password are required,
* and password needs to be authenticated.
*/
public function rules()
{
return array(
array('file', 'file'),
);
}

/**
* Declares attribute labels.
*/
public function attributeLabels()
{
return array(
'file'=>'Upload files',
);
}

public function getReadableFileSize($retstring = null) {
// adapted from code at http://aidanlister.c...ze_readable.php
$sizes = array('bytes', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');

if ($retstring === null) { $retstring = '%01.2f %s'; }

$lastsizestring = end($sizes);

foreach ($sizes as $sizestring) {
if ($this->size < 1024) { break; }
if ($sizestring != $lastsizestring) { $this->size /= 1024; }
}
if ($sizestring == $sizes[0]) { $retstring = '%01d %s'; } // Bytes aren't normally fractional
return sprintf($retstring, $this->size, $sizestring);
}
}
?>


but i have problem i am getting error that XUploadForm.url is undefined.

please help me. i didn't understand where is the problem

and also can anybody tell me XUploadForm.php and XuploadAction.php files
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users