UploadLoader.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace core\upload;
  12. use core\loader\Loader;
  13. /**
  14. * @see UploadLoader
  15. * @package think\facade
  16. * @mixin BaseUpload
  17. * @method string|null upload(string $dir) 附件上传
  18. * @method array fetch(string $url, ?string $key) 抓取远程附件
  19. * @method mixed delete(string $file_name) 附件删除
  20. * @method mixed thumb(string $file_path, $thumb_type) 附件删除
  21. * @method mixed base64(string $base64_data, ?string $key = null) base文件上传
  22. */
  23. class UploadLoader extends Loader
  24. {
  25. /**
  26. * 空间名
  27. * @var string
  28. */
  29. protected $namespace = '\\core\\upload\\';
  30. protected $config_name = 'upload';
  31. /**
  32. * 默认驱动
  33. * @return mixed
  34. */
  35. protected function getDefault()
  36. {
  37. return config('upload.default');
  38. }
  39. }