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