src/behaviors/File.php
private function uploadFile(UploadedFile $file)
    {
        /** @var FileStorage $fileStorage */
        $fileStorage = Yii::$app->get('fileStorage');

        $filename = $fileStorage->saveUploadedFile($file);

        return $fileStorage->put($filename, $file->name);
    }
private function uploadFile(UploadedFile $file)
    {
        /** @var FileStorage $fileStorage */
        $fileStorage = Yii::$app->get('fileStorage');

        $filename = $fileStorage->saveUploadedFile($file);

        return $fileStorage->put($filename, $file->name);
    }
private function uploadFile ( UploadedFile $ file ) { /** @var FileStorage $fileStorage */ $ fileStorage = Yii :: $ app -> get ( 'fileStorage' ) ; $ filename = $ fileStorage -> saveUploadedFile ( $ file ) ; return $ fileStorage -> put ( $ filename , $ file -> name ) ; }
Uploads file to the API server.

@param UploadedFile $file
@return \hipanel\models\File
Uploads file to the API server .