将Ueditor文件上传至OSS
Posted wuba
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了将Ueditor文件上传至OSS相关的知识,希望对你有一定的参考价值。
前人已经将ueditor集成了oss,本次是作为记录
1:点击到下载页面
下载并按照文档安装
2:将
com.zip(在UEditor-for-aliyun-OSS-master\ueditor\src\main\java)拷贝到你的src下
3: 安装原作者文档配置OSSKey.properties,注意:源文档少了ossCliendEndPoint,加上即可,具体如下:
1 # default value false 2 useStatus=true 3 4 # ALIYUN OSS bucket info 5 bucketName= 6 key= 7 8 secret= 9 10 11 # auto create Bucket to default (HangZhou) zone, values true/false 12 # default value false 13 autoCreateBucket=false 14 15 ## ALIYUN OSS URL 16 #ossEndPoint=http://ali--cdn.oss-cn-hangzhou.aliyuncs.com/ 17 ossEndPoint=http://xxx.oss-cn-hangzhou.aliyuncs.com 18 19 #添加ossCliendEndPoint 20 ossCliendEndPoint:http://oss-cn-beijing.aliyuncs.com 21 ## ALIYUN CDN URL 22 # Ueditor use or not use ALIYUN CDN, values true/false 23 # default value false, when useCDN=true, the cdnEndPoint will used. 24 useCDN=false 25 #cdnEndPoint=http(s)://cdn.xiexianbin.cn.w.kunlunar.com/ 26 #cdnEndPoint=http://cdn.xiexianbin.cn.w.kunlunar.com/ 27 28 # Ueditor story or not story image to local direct, values true/false 29 # default value false 30 useLocalStorager=false 31 32 # default Ueditor upload base path, from config.json, when 33 # useLocalStorager=false, this values will work to delete upload 34 # file, default value is "upload", unuse now. 35 #uploadBasePath=upload 36 37 # Ueditor use or not use asynchronous model to upload image to ALIYUN OSS 38 # default value false 39 useAsynUploader=false
4: 只要配置好了以上文件,其他就不需要改动了
以上是关于将Ueditor文件上传至OSS的主要内容,如果未能解决你的问题,请参考以下文章
百度的Ueditor上传到七牛,oss等第三方存储的通用方法(php版)