UEditor For ASP.Net Core Use Qiniu

UEditor For ASP.Net Core Use Qiniu

  • 此项目为UEditor提供文件管理;
  • 后端服务使用 ASP.Net Core;
  • 使用七牛提供的云存储;

 

项目地址

https://github.com/joesjiang/baidu-editor-use-qiniu-net-core

 

运行示例

设置 QiniuFileController.cs 中的以下部分即可直接运行。

  private readonly string accessKey = "xxx"; // 七牛提供的 AccessKey
  private readonly string secretKey = "xxx"; // 七牛提供的 SecretKey
  private readonly string bucket = "xx"; // 在七牛设置的空间名
  private readonly string suffix = "";   // 在七牛设置的缩略图后缀
  private readonly string domain = "http://xxx.com"; // 在七牛绑定的域名

 

在你自己的项目中使用步骤

1、在你的项目文件 project.json 中添加引用 DevZH.Qiniu。

"dependencies": {
    "DevZH.Qiniu": "6.2.2.2",
    ...
  }

2、将示例项目的 wwwroot\lib\ueditor 整个文件夹复制到你项目的同样位置。

3、将示例项目的 QiniuFileController.cs 复制到你项目的同样位置并修改相关的设置信息。

4、新建任意测试视图,引入UEditor相关文件,即可正常使用。

<div>
    <script type="text/plain" id="content" name="content" >
        UEditor
    </script>
</div>
<script src="~/lib/ueditor/ueditor.config.js"></script>
<script src="~/lib/ueditor/ueditor.all.js"></script>
<script type="text/javascript">
    var ue = UE.getEditor('content'); 
</script>


转载于:https://www.cnblogs.com/Joes/p/ueditor-for-aspnetcore-use-qiniu.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值