Upload.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace crmeb\services\upload;
  12. use crmeb\basic\BaseManager;
  13. use think\facade\Config;
  14. /**
  15. * Class Upload
  16. * @package crmeb\services\upload
  17. * @mixin \crmeb\services\upload\storage\Local
  18. * @mixin \crmeb\services\upload\storage\OSS
  19. * @mixin \crmeb\services\upload\storage\COS
  20. * @mixin \crmeb\services\upload\storage\Qiniu
  21. * @mixin \crmeb\services\upload\storage\Jdoss
  22. * @mixin \crmeb\services\upload\storage\Obs
  23. * @mixin \crmeb\services\upload\storage\Tyoss
  24. */
  25. class Upload extends BaseManager
  26. {
  27. /**
  28. * 空间名
  29. * @var string
  30. */
  31. protected $namespace = '\\crmeb\\services\\upload\\storage\\';
  32. /**
  33. * 设置默认上传类型
  34. * @return mixed
  35. */
  36. protected function getDefaultDriver()
  37. {
  38. return Config::get('upload.default', 'local');
  39. }
  40. }