From 0a2afde1ec5635c0fc228f34ec1f8ca5c5fe8ee8 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 24 Feb 2026 14:20:43 -0800 Subject: [PATCH] 4648 --- Attachments/AttachmentTest.cs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Attachments/AttachmentTest.cs b/Attachments/AttachmentTest.cs index adbfb4f..d48a329 100644 --- a/Attachments/AttachmentTest.cs +++ b/Attachments/AttachmentTest.cs @@ -75,10 +75,6 @@ namespace raven_integration //create via inventory full test user as attachments use the role of the object attaching to a = await Util.PostFormDataAsync("attachment", formDataContent, await Util.GetTokenAsync("superuser", "l3tm3in")); -// {[error, { -// "code": "2203", -// "message": "Missing one or more required FormFieldData values: AttachToAType, AttachToObjectId, FileData" -// }]} Util.ValidateDataReturnResponseOk(a); @@ -123,7 +119,7 @@ namespace raven_integration MultipartFormDataContent formDataContent = new MultipartFormDataContent(); - formDataContent.Add(new StringContent("2"), name: "AttachToObjectType"); + formDataContent.Add(new StringContent("3"), name: "AttachToAType"); formDataContent.Add(new StringContent("1"), name: "AttachToObjectId"); formDataContent.Add(new StringContent("Test:AttachmentUploadDownloadDeleteShouldWork"), name: "Notes"); formDataContent.Add(new StringContent("[{\"name\":\"test.png\",\"lastModified\":1586900220990}]"), name: "FileData"); @@ -155,7 +151,7 @@ namespace raven_integration //Form data bizobject type and id //HERE IS THE ERROR CONDITION: LICENSE TYPE OBJECT WHICH IS UNATTACHABLE - formDataContent.Add(new StringContent("5"), name: "AttachToObjectType"); + formDataContent.Add(new StringContent("5"), name: "AttachToAType"); formDataContent.Add(new StringContent("1"), name: "AttachToObjectId"); StreamContent file1 = new StreamContent(File.OpenRead($"{Util.TEST_DATA_FOLDER}\\test.png")); @@ -180,10 +176,10 @@ namespace raven_integration MultipartFormDataContent formDataContent = new MultipartFormDataContent(); //Form data like the bizobject type and id - formDataContent.Add(new StringContent("2"), name: "AttachToObjectType"); + formDataContent.Add(new StringContent("3"), name: "AttachToAType"); - //HERE IS THE ERROR CONDITION, A NON EXISTENT ID VALUE FOR THE WIDGET - formDataContent.Add(new StringContent(long.MaxValue.ToString()), name: "AttachToObjectId");//non-existent widget + //HERE IS THE ERROR CONDITION, A NON EXISTENT ID VALUE FOR THE USER + formDataContent.Add(new StringContent(long.MaxValue.ToString()), name: "AttachToObjectId");//non-existent user StreamContent file1 = new StreamContent(File.OpenRead($"{Util.TEST_DATA_FOLDER}\\test.png")); file1.Headers.ContentType = new MediaTypeHeaderValue("image/png");