public dynamic MoveFiles(string fileids, int destinationFolderID, bool overWrite) { try { List <int> ExistingIds = new List <int>(); foreach (int fileID in fileids.Split(',').Select(s => int.Parse(s)).Distinct().ToList()) { string result = BrowseUploadFactory.MoveFile(fileID, destinationFolderID, overWrite); if (!string.IsNullOrEmpty(result) && result.ToLower() == "exist") { ExistingIds.Add(fileID); } } if (ExistingIds.Count > 0) { dynamic result = new ExpandoObject(); result.Error = "Exist"; result.ExistingFiles = new List <object>(); foreach (int id in ExistingIds) { result.ExistingFiles.Add(BrowseUploadFactory.GetFile(PortalSettings, id)); } return(result); } else { return("Success"); } } catch (Exception ex) { DotNetNuke.Services.Exceptions.Exceptions.LogException(ex); return(ex.Message.ToString()); } }
public string MoveFile(int fileID, int destinationFolderID, bool overWrite) { try { return(BrowseUploadFactory.MoveFile(fileID, destinationFolderID, overWrite)); } catch (Exception ex) { DotNetNuke.Services.Exceptions.Exceptions.LogException(ex); return(ex.Message.ToString()); } }