【发布时间】:2014-05-31 14:05:49
【问题描述】:
我有一个任务要在Yii 中实现resumable,并且我实现了上传控制,但之前从未Resumable。
public function actionUpload()
{
$model=new User;
if(isset($_POST['User'])) {
$model->attributes=$_POST['User'];
$model->image=CUploadedFile::getInstance($model,'image');
if($model->save()) {
$model->image->saveAs('upload/'.$model->image->name);
$this->redirect(array('view','id'=>$model->uUserID));
}
}
$this->render('upload',array('model'=>$model));
}
任务是将文件分成小块。
示例:一个文件可以是 1 GB。我尝试使用休息服务发送该文件。
【问题讨论】:
-
那么,您需要怎样的帮助。您的帖子不清楚。
-
resumablejs.com 嗨,这是可恢复的,但我不知道如何在控制器中使用它,谢谢您的帮助。我将首先尝试解决该问题,然后我将尝试实施可恢复的。
标签: php file-upload yii resume-upload resumablejs