You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
920 B
PHTML
44 lines
920 B
PHTML
2 years ago
|
<?php
|
||
|
|
||
|
namespace App\Services;
|
||
|
|
||
|
use Illuminate\Http\Request;
|
||
|
|
||
|
class CrossFileService
|
||
|
{
|
||
|
/**
|
||
|
* @var FileInterface
|
||
|
*/
|
||
|
private $fileService;
|
||
|
|
||
|
public function __construct()
|
||
|
{
|
||
|
$this->fileService = new DiskFileService();
|
||
|
}
|
||
|
|
||
|
public function deleteFile($uid, $callback = null)
|
||
|
{
|
||
|
$this->fileService->deleteFile($uid, $callback);
|
||
|
}
|
||
|
|
||
|
public function saveFile($user, Request $request, $name = 'file')
|
||
|
{
|
||
|
return $this->fileService->saveFile($user, $request, $name);
|
||
|
}
|
||
|
|
||
|
public function download($uid)
|
||
|
{
|
||
|
return $this->fileService->download($uid);
|
||
|
}
|
||
|
|
||
|
public function downloadImageRate($uid, $type, $size)
|
||
|
{
|
||
|
return $this->fileService->downloadImageRate($uid, $type, $size);
|
||
|
}
|
||
|
|
||
|
public function downloadImage($uid, $width, $height)
|
||
|
{
|
||
|
return $this->fileService->downloadImage($uid, $width, $height);
|
||
|
}
|
||
|
}
|