SVN r556
SVN-Revision: r556
This commit is contained in:
@@ -2976,6 +2976,20 @@ namespace Lskj.Control.Model
|
||||
if (!string.IsNullOrEmpty(token))
|
||||
{
|
||||
string speciesno = "010105";
|
||||
string selectSql = $"select * from P_fm_FileTab where parentid in (select dirid from P_fm_DirectoryTab where pid = '{idValue}' and dllcoid = '{Model.ModuleCode}') and speciesno = '{speciesno}' and sname = '{Path.GetFileName(filePath).Replace(" ", "")}'";
|
||||
DataTable deleteTable = BaseImpl.GetDataTableResult(selectSql);
|
||||
if (deleteTable != null && deleteTable.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow deleteRow in deleteTable.Rows)
|
||||
{
|
||||
string field = HttpUtility.UrlEncode(deleteRow["fileId"] + "");
|
||||
string webpath = HttpUtility.UrlEncode(deleteRow["webpath"] + "");
|
||||
//删除文件
|
||||
string deleteUrl = "{0}Api/FileUploadApi.ashx?fileId={1}&filename={2}&method={3}";
|
||||
deleteUrl = string.Format(deleteUrl, SystemInfo.Instance.OAUrl, field, webpath, "DoDelete");
|
||||
UploadFileUtil.DeleteFile(token, deleteUrl, out string deleteRtnMsg);
|
||||
}
|
||||
}
|
||||
byte[] fileBytes = UploadFileUtil.ConvertFileToBytes(filePath);
|
||||
string fileStream = Convert.ToBase64String(fileBytes);
|
||||
string postUrl = "{0}Api/FileUploadApi.ashx?moduleId={1}&idValue={2}&speciesno={8}&folder={3}&totsize={4}&position={5}&filename={6}&method={7}";
|
||||
|
||||
Reference in New Issue
Block a user