Upload.php 707 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace crmeb\services\upload;
  3. use crmeb\basic\BaseManager;
  4. use think\facade\Config;
  5. /**
  6. * Class Upload
  7. * @package crmeb\services\upload
  8. * @mixin \crmeb\services\upload\storage\Local
  9. * @mixin \crmeb\services\upload\storage\OSS
  10. * @mixin \crmeb\services\upload\storage\COS
  11. * @mixin \crmeb\services\upload\storage\Qiniu
  12. */
  13. class Upload extends BaseManager
  14. {
  15. /**
  16. * 空间名
  17. * @var string
  18. */
  19. protected $namespace = '\\crmeb\\services\\upload\\storage\\';
  20. /**
  21. * 设置默认上传类型
  22. * @return mixed
  23. */
  24. protected function getDefaultDriver()
  25. {
  26. return Config::get('upload.default', 'local');
  27. }
  28. }