fipamo/app/Http/Controllers/API/FileUploadAPIController.php
ro 6ce5e91624
file upload service added
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
2024-03-11 16:32:38 -06:00

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);
}
}