/// <summary> /// 原始图片保存 /// </summary> /// <param name="fileIdentity"></param> /// <param name="destFileName"></param> public static void OriginalImageSave(string fileIdentity, string destFileName) { if (string.IsNullOrWhiteSpace(fileIdentity) || string.IsNullOrWhiteSpace(destFileName)) { return; } var result = FileUploadManager.FileExists(fileIdentity); if (result) { var filePath = FileUploadManager.GetFilePhysicalFullPath(fileIdentity); CreateStandardImages(fileIdentity, destFileName); var fileExtensionName = FileUploadManager.GetFileExtensionName(fileIdentity); var savePath = FilePathHelp.GetFileSavePath(fileExtensionName.ToLower()); OriginalImageSave(fileIdentity, destFileName, savePath); } }
/// <summary> /// 保存视频文件 /// </summary> /// <param name="fileIdentity"></param> /// <param name="destFileName"></param> public static void Save(string fileIdentity, string destFileName) { if (string.IsNullOrWhiteSpace(fileIdentity) || string.IsNullOrWhiteSpace(destFileName)) { return; } var result = FileUploadManager.FileExists(fileIdentity); if (result) { var fileExtensionName = FileUploadManager.GetFileExtensionName(fileIdentity).ToUpper(); var filePath = FileUploadManager.GetFilePhysicalFullPath(fileIdentity); if (Image360FileExtensionName.Contains(fileExtensionName)) { if (destFileName.IndexOf(".") == -1) { destFileName = destFileName + "." + fileExtensionName; } var savePath = FilePathHelp.GetFileSavePath(fileExtensionName.ToLower()); savePath += FilePathHelp.GetSubFolderName(destFileName); foreach (string localPath in LocalPathList) { string path = localPath + savePath.Replace("/", "\\"); //判断文件夹是否存在 if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } destFileName = path + destFileName; //FLV文件重命名操作,不进行DFIS处理 File.Copy(filePath, destFileName, true); } } } }