Upload.php 691 B

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