<?php

namespace Application\Service\Extension\Uploader;

abstract class UploadAdapterAbstract
{
    public array $config;

    public function __construct(array $config)
    {
        $this->config = $config;
    }

    public function upload(Image $file){}

    public function getConfig()
    {
        return $this->config;
    }

    public function getSavePath()
    {
        return $this->config['savePath'] ?? '';
    }

    public function getSaveDir(): string
    {
        return '/upload/' . date('Y-m-d');
//        return $this->config['saveDir'] ?? '';
    }

    public function downOssFile($uploadFile, $localFile)
    {

    }

    public static function getUploadDomain(): string
    {
        return '';
    }

}