2019-09-30 15:30:36 +08:00

81 lines
5.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<form onsubmit="return false;" data-auto="true" action="{:url()}" method="post" class='layui-form layui-card' autocomplete="off">
<div class="layui-card-body">
<div class="color-text margin-left-40 margin-bottom-20 layui-code" style="border-left-width:1px;background:none">
<p class="margin-bottom-5 font-w7">文件将上传到阿里云OSS空间需要配置OSS公开访问及跨域策略</p>
目前已实现自动创建空间及配置访问策略!<a target="_blank" href="https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=08p1pddw">我要免费申请</a>
</div>
<div class="layui-form-item">
<label class="layui-form-label">AllowExts<br><span class="nowrap color-desc">允许类型</span></label>
<div class="layui-input-block">
<input type="text" name="storage_local_exts" required value="{:sysconf('storage_local_exts')}" placeholder="请输入系统文件上传后缀" class="layui-input">
<p class="help-block">设置系统允许上传文件的后缀多个以英文逗号隔开。如png,jpg,rar,doc</p>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label label-required">Protocol<br><span class="nowrap color-desc">访问协议</span></label>
<div class="layui-input-block">
{foreach ['http','https','auto'] as $pro}
<label class="think-radio">
{if sysconf('storage_oss_is_https') eq $pro}
<input checked type="radio" name="storage_oss_is_https" value="{$pro}" lay-ignore> {$pro}
{else}
<input type="radio" name="storage_oss_is_https" value="{$pro}" lay-ignore> {$pro}
{/if}
</label>
{/foreach}
<p class="help-block">阿里云对象存储访问协议http、https、auto其中 https 需要配置证书才能使用auto 为相对协议自动根据域名切换http与https。</p>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">Bucket<br><span class="nowrap color-desc">空间名称</span></label>
<div class="layui-input-block">
<input type="text" name="storage_oss_bucket" required value="{:sysconf('storage_oss_bucket')}" placeholder="请输入OSS Bucket (空间名称)" class="layui-input">
<p class="help-block">填写OSS存储空间名称think-admin-oss需要是全区唯一的值不存在时会自动创建</p>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">EndPoint<br><span class="nowrap color-desc">数据中心</span></label>
<div class="layui-input-block">
<select required name="storage_oss_endpoint" class="layui-select" lay-search>
{foreach $ossPoints as $k=>$p}
{if sysconf('storage_oss_endpoint') eq $k}
<option selected value="{$k}">{$p} <span class="font-s10 color-desc">({$k})</span></option>
{else}
<option value="{$k}">{$p} <span class="font-s10 color-desc">({$k})</span></option>
{/if}
{/foreach}
</select>
<p class="help-block">请选择OSS数据中心访问节点有效值如oss-cn-shenzhen.aliyuncs.com</p>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">AccessKey<br><span class="nowrap color-desc">访问密钥</span></label>
<div class="layui-input-block">
<input type="text" name="storage_oss_keyid" required value="{:sysconf('storage_oss_keyid')}" maxlength="16" placeholder="请输入OSS AccessKey (访问密钥)" class="layui-input">
<p class="help-block">可以在 [ 阿里云 > 个人中心 ] 设置并获取到访问密钥。</p>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">SecretKey<br><span class="nowrap color-desc">安全密钥</span></label>
<div class="layui-input-block">
<input type="text" name="storage_oss_secret" required value="{:sysconf('storage_oss_secret')}" maxlength="30" placeholder="请输入OSS SecretKey (安全密钥)" class="layui-input">
<p class="help-block">可以在 [ 阿里云 > 个人中心 ] 设置并获取到安全密钥。</p>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">Domain<br><span class="nowrap color-desc">访问域名</span></label>
<div class="layui-input-block">
<input type="text" name="storage_oss_domain" value="{:sysconf('storage_oss_domain')}" placeholder="请输入OSS存储 Domain (访问域名)" class="layui-input">
<p class="help-block">填写OSS存储外部访问域名think-admin-oss.oss-cn-shenzhen.aliyuncs.com正常情况下是自动获取的</p>
</div>
</div>
<div class="hr-line-dashed margin-left-40"></div>
<div class="layui-form-item text-center padding-left-40">
<input type="hidden" name="storage_type" value="oss">
<button class="layui-btn" type="submit">保存配置</button>
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消修改吗?" data-close>取消修改</button>
</div>
</div>
<script>form.render()</script>
</form>