This commit is contained in:
@@ -5507,6 +5507,13 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
progress.SubOp("Wikifile: \"" + af.Name + "\" " + AyaBizUtils.FileSizeDisplay((decimal)af.FileSize));
|
progress.SubOp("Wikifile: \"" + af.Name + "\" " + AyaBizUtils.FileSizeDisplay((decimal)af.FileSize));
|
||||||
if (IsDuplicatev7v8IdMapItem(i.LT_O_AyaFile.Value, i.LT_O_AyaFile.Display, progress)) continue;
|
if (IsDuplicatev7v8IdMapItem(i.LT_O_AyaFile.Value, i.LT_O_AyaFile.Display, progress)) continue;
|
||||||
|
|
||||||
|
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");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
//Compile the FileData property
|
//Compile the FileData property
|
||||||
var sDate = i.LT_Common_Label_Created.ToString();
|
var sDate = i.LT_Common_Label_Created.ToString();
|
||||||
DateTimeOffset dtLastModified = DateTime.UtcNow;
|
DateTimeOffset dtLastModified = DateTime.UtcNow;
|
||||||
@@ -5563,7 +5570,30 @@ namespace AyaNova.PlugIn.V8
|
|||||||
formDataContent.Add(AttachmentFile);
|
formDataContent.Add(AttachmentFile);
|
||||||
|
|
||||||
//Upload
|
//Upload
|
||||||
var a = await util.PostFormDataAsync("attachment", formDataContent);
|
util.ApiResponse a = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
a=await util.PostFormDataAsync("attachment", formDataContent);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
if (ex.Message.Contains("413"))
|
||||||
|
{
|
||||||
|
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");
|
||||||
|
continue;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Map it for later processing of wiki
|
//Map it for later processing of wiki
|
||||||
//attachment upload route returns all attachments for this object in file name order
|
//attachment upload route returns all attachments for this object in file name order
|
||||||
//so need to find *our* most recent uploaded attachment so need to find the highest raven id number
|
//so need to find *our* most recent uploaded attachment so need to find the highest raven id number
|
||||||
|
|||||||
@@ -359,6 +359,8 @@ namespace AyaNova.PlugIn.V8
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
if (ex.Message.Contains("413")) throw;//too large, no point in retrying at all let upstream caller handle it immediately
|
||||||
|
|
||||||
if (FirstException == null)
|
if (FirstException == null)
|
||||||
FirstException = ex;
|
FirstException = ex;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user