Ejemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     $this->tempName = $this->flowConfig->getTempDir() . DIRECTORY_SEPARATOR . $this->tempName;
     $this->error = file_exists($this->tempName) ? UPLOAD_ERR_OK : UPLOAD_ERR_NO_FILE;
     if ($this->error === UPLOAD_ERR_OK) {
         $this->type = FileHelper::getMimeType($this->tempName);
         $this->size = filesize($this->tempName);
     }
 }
Ejemplo n.º 2
0
 public function actionRemoveOutdatedFiles()
 {
     Uploader::pruneChunks($this->flowConfig->getTempDir(), $this->expirationTime);
 }