在线文档编辑修改
This commit is contained in:
parent
8a39c901d4
commit
b8941a01d7
Binary file not shown.
|
@ -10,6 +10,7 @@ namespace BLL
|
|||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
/// <summary>
|
||||
|
@ -1281,6 +1282,25 @@ namespace BLL
|
|||
IRestResponse response = client.Execute(request);
|
||||
return response.Content;
|
||||
}
|
||||
public static string GetMD5(string str)
|
||||
{
|
||||
using (MD5 md5 = MD5.Create())
|
||||
{
|
||||
// 将输入字符串转换为字节数组并计算哈希值
|
||||
byte[] inputBytes = Encoding.ASCII.GetBytes(str);
|
||||
byte[] hashBytes = md5.ComputeHash(inputBytes);
|
||||
|
||||
// 将字节数组转换为十六进制字符串
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < hashBytes.Length; i++)
|
||||
{
|
||||
sb.Append(hashBytes[i].ToString("X2"));
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OnlineEditingPrivate.aspx.cs" Inherits="FineUIPro.Web.AttachFile.OnlineEditingPrivate" %>
|
||||
<%@ Import Namespace="BLL" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
@ -159,7 +160,8 @@
|
|||
}
|
||||
};
|
||||
// var urlString = "https://cloud.e-iceblue.cn/demo/sample.docx";
|
||||
var urlString = "<%=BLL.Funs.SGGLUrl%>" + "<%=PCUrl%>";
|
||||
<%-- //var urlString = "<%=BLL.Funs.SGGLUrl%>" + "<%=PCUrl%>";--%>
|
||||
var urlString = "<%=urlString%>";
|
||||
|
||||
var arrfn = urlString.split(".");
|
||||
var strp = arrfn[arrfn.length - 1];
|
||||
|
@ -201,7 +203,7 @@
|
|||
fileInfo: {
|
||||
name: '',
|
||||
ext: '',
|
||||
primary: urlString,
|
||||
primary: '<%=urlStringMD5%>',
|
||||
creator: '',
|
||||
createTime: new Date('20210505')
|
||||
},
|
||||
|
@ -211,8 +213,8 @@
|
|||
verification: null, //用户文件系统下载文件时若需要验证类似token的数据可以写在这里
|
||||
canEdit: true
|
||||
},
|
||||
templates:"",
|
||||
whiteLabel:true,
|
||||
templates: "",
|
||||
whiteLabel: true,
|
||||
user: {
|
||||
primary: '',
|
||||
name: '<%=this.CurrUser.UserName%>',
|
||||
|
|
|
@ -60,6 +60,8 @@ namespace FineUIPro.Web.AttachFile
|
|||
ViewState["editorMode"] = value;
|
||||
}
|
||||
}
|
||||
public string urlString = String.Empty;
|
||||
public string urlStringMD5 = String.Empty;
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
|
@ -72,7 +74,8 @@ namespace FineUIPro.Web.AttachFile
|
|||
PCUrl = Request.Params["fileUrl"];
|
||||
editorMode = Request.Params["editorMode"];
|
||||
|
||||
|
||||
urlString = Funs.SGGLUrl + PCUrl;
|
||||
urlStringMD5 = Funs.GetMD5(urlString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue