From db1911a52675516dd8dae875095a1fa2a0ab1f7e Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 30 Aug 2021 18:35:06 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 27 +++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 6c681c9..f2cc83a 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -374,7 +374,20 @@ namespace AyaNova.PlugIn.V8 private bool V7UseInventory = false; private List Allv8WarehouseIds = new List(); - private long SmallestFileUploadRejectedAsTooBig = long.MaxValue; + private const long AYANOVA_SERVER_MAX_ATTACH_SIZE_LIMIT=10737418241; + private long SmallestFileUploadRejectedAsTooBig = AYANOVA_SERVER_MAX_ATTACH_SIZE_LIMIT; + + private string MaxFileSizeInfo(long lSize) + { + if (lSize > AYANOVA_SERVER_MAX_ATTACH_SIZE_LIMIT) + { + return "AyaNova 8 allows 10GiB Maximum attachment size"; + } + else + { + return "Adjust destination proxy / front end server settings to allow files of this size (AyaNova 8 limit is 10GiB)"; + } + } @@ -5510,7 +5523,7 @@ namespace AyaNova.PlugIn.V8 if (af.FileSize > SmallestFileUploadRejectedAsTooBig) { - progress.Append("WIKI Attachment file " + i.LT_O_AyaFile.Display + " too large (" + af.FileSize.ToString() + ") for this server. Adjust destination server settings to allow"); + progress.Append("WIKI Attachment file " + i.LT_O_AyaFile.Display + " too large (" + af.FileSize.ToString() + "). " + MaxFileSizeInfo(af.FileSize)); continue; } @@ -5582,7 +5595,7 @@ namespace AyaNova.PlugIn.V8 { if (SmallestFileUploadRejectedAsTooBig > af.FileSize) SmallestFileUploadRejectedAsTooBig = af.FileSize; - progress.Append("WIKI Attachment file " + i.LT_O_AyaFile.Display + " too large (" + af.FileSize.ToString() + ") for this server. Adjust destination server settings to allow"); + progress.Append("WIKI Attachment file " + i.LT_O_AyaFile.Display + " too large (" + af.FileSize.ToString() + "). " + MaxFileSizeInfo(af.FileSize)); continue; } @@ -5652,8 +5665,8 @@ namespace AyaNova.PlugIn.V8 if (fi.Length > SmallestFileUploadRejectedAsTooBig) { - progress.Append("Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + fi.Length.ToString() + ") for this server. Adjust destination server settings to allow"); - NonFileUrls += (ImportTag + " - Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + fi.Length.ToString() + ") for this server. Adjust destination server settings to allow.\n"); + progress.Append("Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + fi.Length.ToString() + "). " + MaxFileSizeInfo(fi.Length)); + NonFileUrls += (ImportTag + " - Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + fi.Length.ToString() + ")." + MaxFileSizeInfo(fi.Length) + "\n"); continue; } //Compile the FileData property @@ -5718,8 +5731,8 @@ namespace AyaNova.PlugIn.V8 { if (SmallestFileUploadRejectedAsTooBig > fi.Length) SmallestFileUploadRejectedAsTooBig = fi.Length; - progress.Append("Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + fi.Length.ToString() + ") for this server. Adjust destination server settings to allow"); - NonFileUrls += (ImportTag + " - Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + fi.Length.ToString() + ") for this server. Adjust destination server settings to allow.\n"); + progress.Append("Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + fi.Length.ToString() + "). " + MaxFileSizeInfo(fi.Length)); + NonFileUrls += (ImportTag + " - Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + fi.Length.ToString() + ")." + MaxFileSizeInfo(fi.Length) + "\n"); continue; }