forked from projects/fipamo
ro
6ce5e91624
ported over the new file uploader from the old build and made it a service make for from some additonal file processing i.e. image optimization or video converstion before it is saved to the system
23 lines
481 B
PHP
23 lines
481 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use App\Services\FileUploadService;
|
|
|
|
class FileUploadAPIController extends Controller
|
|
{
|
|
protected $upload;
|
|
|
|
public function __construct(FileUploadService $fileUploadService)
|
|
{
|
|
$this->upload = $fileUploadService;
|
|
}
|
|
|
|
public function upload(Request $request, $type = null)
|
|
{
|
|
return $this->upload->handleFile($request, $type);
|
|
}
|
|
}
|