storage-qiniu.html 5.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <form onsubmit="return false" data-auto="true" action="{:url()}" method="post" class='layui-form layui-card' autocomplete="off">
  2. <div class="layui-card-body">
  3. <div class="color-text margin-left-40 margin-bottom-20 layui-code" style="border-left-width:1px;background:none">
  4. <p class="margin-bottom-5 font-w7">文件将上传到七牛云存储,对象存储需要配置为公开访问的Bucket空间!</p>
  5. 完成实名认证后可获得10G免费存储空间哦!<a target="_blank" href="https://portal.qiniu.com/signup?code=1hefnmobzees2">我要免费申请</a>
  6. </div>
  7. <div class="layui-form-item">
  8. <label class="layui-form-label">AllowExts<br><span class="nowrap color-desc">允许类型</span></label>
  9. <div class="layui-input-block">
  10. <input type="text" name="storage_local_exts" required value="{:sysconf('storage_local_exts')}" placeholder="请输入系统文件上传后缀" class="layui-input">
  11. <p class="help-block">设置系统允许上传文件的后缀,多个以英文逗号隔开。如:png,jpg,rar,doc</p>
  12. </div>
  13. </div>
  14. <div class="layui-form-item" data-storage-type="qiniu">
  15. <label class="layui-form-label label-required">Protocol<br><span class="nowrap color-desc">访问协议</span></label>
  16. <div class="layui-input-block">
  17. {foreach ['http','https','auto'] as $pro}
  18. <label class="think-radio">
  19. {if sysconf('storage_qiniu_is_https') eq $pro}
  20. <input checked type="radio" name="storage_qiniu_is_https" value="{$pro}" lay-ignore> {$pro}
  21. {else}
  22. <input type="radio" name="storage_qiniu_is_https" value="{$pro}" lay-ignore> {$pro}
  23. {/if}
  24. </label>
  25. {/foreach}
  26. <p class="help-block">七牛云存储访问协议,其中 https 需要配置证书才能使用,auto 为相对协议。</p>
  27. </div>
  28. </div>
  29. <div class="layui-form-item" data-storage-type="qiniu">
  30. <label class="layui-form-label">Region<br><span class="nowrap color-desc label-required">存储区域</span></label>
  31. <div class="layui-input-block">
  32. {foreach ['华东','华北','华南','北美'] as $area}
  33. <label class="think-radio">
  34. {if sysconf('storage_qiniu_region') eq $area}
  35. <input checked type="radio" name="storage_qiniu_region" value="{$area}" lay-ignore>
  36. {else}
  37. <input type="radio" name="storage_qiniu_region" value="{$area}" lay-ignore>
  38. {/if}
  39. {$area}
  40. </label>
  41. {/foreach}
  42. <p class="help-block">七牛云存储空间所在区域,需要严格对应储存所在区域才能上传文件。</p>
  43. </div>
  44. </div>
  45. <div class="layui-form-item" data-storage-type="qiniu">
  46. <label class="layui-form-label">Bucket<br><span class="nowrap color-desc">空间名称</span></label>
  47. <div class="layui-input-block">
  48. <input type="text" name="storage_qiniu_bucket" required value="{:sysconf('storage_qiniu_bucket')}" placeholder="请输入七牛云存储 Bucket (空间名称)" class="layui-input">
  49. <p class="help-block">填写七牛云存储空间名称,如:static</p>
  50. </div>
  51. </div>
  52. <div class="layui-form-item" data-storage-type="qiniu">
  53. <label class="layui-form-label">Domain<br><span class="nowrap color-desc">访问域名</span></label>
  54. <div class="layui-input-block">
  55. <input type="text" name="storage_qiniu_domain" required value="{:sysconf('storage_qiniu_domain')}" placeholder="请输入七牛云存储 Domain (访问域名)" class="layui-input">
  56. <p class="help-block">填写七牛云存储访问域名,如:static.ctolog.cc</p>
  57. </div>
  58. </div>
  59. <div class="layui-form-item" data-storage-type="qiniu">
  60. <label class="layui-form-label">AccessKey<br><span class="nowrap color-desc">访问密钥</span></label>
  61. <div class="layui-input-block">
  62. <input type="text" name="storage_qiniu_access_key" required value="{:sysconf('storage_qiniu_access_key')}" placeholder="请输入七牛云 AccessKey (访问密钥)" class="layui-input">
  63. <p class="help-block">可以在 [ 七牛云 > 个人中心 ] 设置并获取到访问密钥。</p>
  64. </div>
  65. </div>
  66. <div class="layui-form-item" data-storage-type="qiniu">
  67. <label class="layui-form-label">SecretKey<br><span class="nowrap color-desc">安全密钥</span></label>
  68. <div class="layui-input-block">
  69. <input type="text" name="storage_qiniu_secret_key" required value="{:sysconf('storage_qiniu_secret_key')}" maxlength="43" placeholder="请输入七牛云 SecretKey (安全密钥)" class="layui-input">
  70. <p class="help-block">可以在 [ 七牛云 > 个人中心 ] 设置并获取到安全密钥。</p>
  71. </div>
  72. </div>
  73. <div class="hr-line-dashed margin-left-40"></div>
  74. <div class="layui-form-item text-center padding-left-40">
  75. <input type="hidden" name="storage_type" value="qiniu">
  76. <button class="layui-btn" type="submit">保存配置</button>
  77. <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消修改吗?" data-close>取消修改</button>
  78. </div>
  79. </div>
  80. </form>