config.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <?php
  2. return [
  3. [
  4. 'name' => 'accessKeyId',
  5. 'title' => 'AccessKey ID',
  6. 'type' => 'string',
  7. 'content' => [],
  8. 'value' => 'LTAI5tPyzxNXP5ZLEsSyPMDz',
  9. 'rule' => 'required',
  10. 'msg' => '',
  11. 'tip' => '',
  12. 'ok' => '',
  13. 'extend' => '',
  14. ],
  15. [
  16. 'name' => 'accessKeySecret',
  17. 'title' => 'AccessKey Secret',
  18. 'type' => 'string',
  19. 'content' => [],
  20. 'value' => 's307DTRXawGU576Dg98kOj5HVSd7D9',
  21. 'rule' => 'required',
  22. 'msg' => '',
  23. 'tip' => '',
  24. 'ok' => '',
  25. 'extend' => '',
  26. ],
  27. [
  28. 'name' => 'bucket',
  29. 'title' => 'Bucket名称',
  30. 'type' => 'string',
  31. 'content' => [],
  32. 'value' => 'youtingmini',
  33. 'rule' => 'required;bucket',
  34. 'msg' => '',
  35. 'tip' => '阿里云OSS的空间名',
  36. 'ok' => '',
  37. 'extend' => 'data-rule-bucket="[/^[0-9a-z_\\-]{3,63}$/, \'请输入正确的Bucket名称\']"',
  38. ],
  39. [
  40. 'name' => 'endpoint',
  41. 'title' => 'Endpoint',
  42. 'type' => 'string',
  43. 'content' => [],
  44. 'value' => 'oss-cn-shenzhen.aliyuncs.com',
  45. 'rule' => 'required;endpoint',
  46. 'msg' => '',
  47. 'tip' => '请填写从阿里云存储获取的Endpoint',
  48. 'ok' => '',
  49. 'extend' => 'data-rule-endpoint="[/^(?!http(s)?:\\/\\/).*$/, \'不能以http(s)://开头\']"',
  50. ],
  51. [
  52. 'name' => 'cdnurl',
  53. 'title' => 'CDN地址',
  54. 'type' => 'string',
  55. 'content' => [],
  56. 'value' => 'https://youtingmini.oss-cn-shenzhen.aliyuncs.com',
  57. 'rule' => 'required;cdnurl',
  58. 'msg' => '',
  59. 'tip' => '请填写CDN地址,必须以http(s)://开头',
  60. 'ok' => '',
  61. 'extend' => 'data-rule-cdnurl="[/^http(s)?:\\/\\/.*$/, \'必需以http(s)://开头\']"',
  62. ],
  63. [
  64. 'name' => 'uploadmode',
  65. 'title' => '上传模式',
  66. 'type' => 'select',
  67. 'content' => [
  68. 'client' => '客户端直传(速度快,无备份)',
  69. 'server' => '服务器中转(占用服务器带宽,可备份)',
  70. ],
  71. 'value' => 'client',
  72. 'rule' => '',
  73. 'msg' => '',
  74. 'tip' => '',
  75. 'ok' => '',
  76. 'extend' => '',
  77. ],
  78. [
  79. 'name' => 'serverbackup',
  80. 'title' => '服务器中转模式备份',
  81. 'type' => 'radio',
  82. 'content' => [
  83. 1 => '备份(附件管理将产生2条记录)',
  84. 0 => '不备份',
  85. ],
  86. 'value' => '0',
  87. 'rule' => '',
  88. 'msg' => '',
  89. 'tip' => '服务器中转模式下是否备份文件',
  90. 'ok' => '',
  91. 'extend' => '',
  92. ],
  93. [
  94. 'name' => 'savekey',
  95. 'title' => '保存文件名',
  96. 'type' => 'string',
  97. 'content' => [],
  98. 'value' => '/uploads/{year}{mon}{day}/{filemd5}{.suffix}',
  99. 'rule' => 'required',
  100. 'msg' => '',
  101. 'tip' => '',
  102. 'ok' => '',
  103. 'extend' => '',
  104. ],
  105. [
  106. 'name' => 'expire',
  107. 'title' => '上传有效时长',
  108. 'type' => 'string',
  109. 'content' => [],
  110. 'value' => '600',
  111. 'rule' => 'required',
  112. 'msg' => '',
  113. 'tip' => '用户停留页面上传有效时长,单位秒',
  114. 'ok' => '',
  115. 'extend' => '',
  116. ],
  117. [
  118. 'name' => 'maxsize',
  119. 'title' => '最大可上传',
  120. 'type' => 'string',
  121. 'content' => [],
  122. 'value' => '10M',
  123. 'rule' => 'required',
  124. 'msg' => '',
  125. 'tip' => '',
  126. 'ok' => '',
  127. 'extend' => '',
  128. ],
  129. [
  130. 'name' => 'mimetype',
  131. 'title' => '可上传后缀格式',
  132. 'type' => 'string',
  133. 'content' => [],
  134. 'value' => 'jpg,png,bmp,jpeg,gif,zip,rar,xls,xlsx',
  135. 'rule' => 'required',
  136. 'msg' => '',
  137. 'tip' => '',
  138. 'ok' => '',
  139. 'extend' => '',
  140. ],
  141. [
  142. 'name' => 'multiple',
  143. 'title' => '多文件上传',
  144. 'type' => 'bool',
  145. 'content' => [],
  146. 'value' => '0',
  147. 'rule' => 'required',
  148. 'msg' => '',
  149. 'tip' => '',
  150. 'ok' => '',
  151. 'extend' => '',
  152. ],
  153. [
  154. 'name' => 'thumbstyle',
  155. 'title' => '缩略图样式',
  156. 'type' => 'string',
  157. 'content' => [],
  158. 'value' => '',
  159. 'rule' => '',
  160. 'msg' => '',
  161. 'tip' => '用于后台列表缩略图样式,可使用:?x-oss-process=image/resize,m_lfit,w_120,h_90',
  162. 'ok' => '',
  163. 'extend' => '',
  164. ],
  165. [
  166. 'name' => 'chunking',
  167. 'title' => '分片上传',
  168. 'type' => 'radio',
  169. 'content' => [
  170. 1 => '开启',
  171. 0 => '关闭',
  172. ],
  173. 'value' => '0',
  174. 'rule' => 'required',
  175. 'msg' => '',
  176. 'tip' => '',
  177. 'ok' => '',
  178. 'extend' => '',
  179. ],
  180. [
  181. 'name' => 'chunksize',
  182. 'title' => '分片大小',
  183. 'type' => 'number',
  184. 'content' => [],
  185. 'value' => '4194304',
  186. 'rule' => 'required',
  187. 'msg' => '',
  188. 'tip' => '',
  189. 'ok' => '',
  190. 'extend' => '',
  191. ],
  192. [
  193. 'name' => 'syncdelete',
  194. 'title' => '附件删除时是否同步删除文件',
  195. 'type' => 'bool',
  196. 'content' => [],
  197. 'value' => '0',
  198. 'rule' => 'required',
  199. 'msg' => '',
  200. 'tip' => '',
  201. 'ok' => '',
  202. 'extend' => '',
  203. ],
  204. [
  205. 'name' => 'apiupload',
  206. 'title' => 'API接口使用云存储',
  207. 'type' => 'bool',
  208. 'content' => [],
  209. 'value' => '1',
  210. 'rule' => 'required',
  211. 'msg' => '',
  212. 'tip' => '',
  213. 'ok' => '',
  214. 'extend' => '',
  215. ],
  216. [
  217. 'name' => 'noneedlogin',
  218. 'title' => '免登录上传',
  219. 'type' => 'checkbox',
  220. 'content' => [
  221. 'api' => 'API',
  222. 'index' => '前台',
  223. 'admin' => '后台',
  224. ],
  225. 'value' => 'api,index,admin',
  226. 'rule' => '',
  227. 'msg' => '',
  228. 'tip' => '',
  229. 'ok' => '',
  230. 'extend' => '',
  231. ],
  232. [
  233. 'name' => 'uploadmodule',
  234. 'title' => '上传开启模块',
  235. 'type' => 'checkbox',
  236. 'content' => [
  237. 'api' => 'API',
  238. 'index' => '前台',
  239. 'admin' => '后台',
  240. ],
  241. 'value' => 'api,index,admin',
  242. 'rule' => '',
  243. 'msg' => '',
  244. 'tip' => '',
  245. 'ok' => '',
  246. 'extend' => '',
  247. ],
  248. ];