Upload.php 653 B

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