upload.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. return [
  12. //默认上传模式,后台配置优先,添加类型一定索引要和驱动名一致 用小些字母
  13. 'default' => 'local',
  14. //上传文件大小
  15. 'filesize' => 2097152,
  16. //上传文件后缀类型
  17. 'fileExt' => ['jpg', 'jpeg', 'png', 'gif', 'svg', 'pem', 'mp3', 'wma', 'wav', 'amr', 'mp4', 'key', 'xlsx', 'xls', 'txt', 'ico'],
  18. //上传文件类型
  19. 'fileMime' => [
  20. 'image/jpg',
  21. 'image/jpeg',
  22. 'image/gif',
  23. 'image/png',
  24. 'image/svg',
  25. 'image/svg+xml',
  26. 'text/plain',
  27. 'audio/mpeg',
  28. 'video/mp4',
  29. 'application/octet-stream',
  30. 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
  31. 'application/vnd.ms-works',
  32. 'application/vnd.ms-excel',
  33. 'application/zip',
  34. 'application/vnd.ms-excel',
  35. 'application/vnd.ms-excel',
  36. 'text/xml',
  37. 'image/x-icon',
  38. 'image/vnd.microsoft.icon',
  39. 'application/x-x509-ca-cert',
  40. 'application/x-pem-file',
  41. ],
  42. //驱动模式,此配置优先与后台配置,后台添加配置请加前缀,例如添加七牛云配置:accessKey 后台添加变量名 qiniu_accessKey
  43. 'stores' => [
  44. //本地上传配置
  45. 'local' => [],
  46. //七牛云上传配置
  47. 'qiniu' => [
  48. 'AccessKeyId' => '', // sys_config('qiniu_accessKey')
  49. 'AccessKeySecret' => '', // sys_config('qiniu_secretKey')
  50. ],
  51. //oss 阿里云上传配置
  52. 'oss' => [
  53. 'AccessKeyId' => '', // sys_config('accessKey')
  54. 'AccessKeySecret' => '', // sys_config('secretKey')
  55. ],
  56. //cos 腾讯云上传配置
  57. 'cos' => [
  58. 'AccessKeyId' => '', //sys_config('tengxun_accessKey')
  59. 'AccessKeySecret' => '', //sys_config('tengxun_secretKey')
  60. 'APPID' => '', //sys_config('tengxun_appid')
  61. ],
  62. //oss 京东云
  63. 'jdoss' => [
  64. 'AccessKeyId' => '', // sys_config('accessKey')
  65. 'AccessKeySecret' => '', // sys_config('secretKey')
  66. ],
  67. //oss 华为云
  68. 'obs' => [
  69. 'AccessKeyId' => '', // sys_config('accessKey')
  70. 'AccessKeySecret' => '', // sys_config('secretKey')
  71. ],
  72. //oss 天翼云
  73. 'tyoss' => [
  74. 'AccessKeyId' => '', // sys_config('accessKey')
  75. 'AccessKeySecret' => '', // sys_config('secretKey')
  76. ],
  77. ]
  78. ];