標籤:ted type 建立 縮圖 .json 地址 修改 位置 targe
UEditor For ASP.Net Core Use Qiniu
- 此項目為UEditor提供檔案管理;
- 後端服務使用 ASP.Net Core;
- 使用七牛提供的雲端儲存;
項目地址
http://git.oschina.net/joesjiang/BaiduEditorUseQiniu.NetCore
運行樣本
設定 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>
UEditor For ASP.Net Core Use Qiniu