This commit is contained in:
2026-02-24 14:16:21 -08:00
parent 1ab81e92ee
commit 0f005d0715
6 changed files with 23 additions and 19 deletions

View File

@@ -27,10 +27,11 @@ namespace raven_integration
d.name = UniqueName;
d.active = true;
d.allowLogin = true;
d.login = UniqueName;
d.password = UniqueName;
d.roles = 2;//BizAdmin needs widget rights
d.userType = 3;//non scheduleable
d.roles = 2;//BizAdmin needs full rights
d.userType = 2;// not service type user
//Required by form custom rules
d.notes = "notes";
@@ -51,7 +52,7 @@ namespace raven_integration
MultipartFormDataContent formDataContent = new MultipartFormDataContent();
//Form data like the bizobject type and id
formDataContent.Add(new StringContent("3"), name: "AttachToObjectType");
formDataContent.Add(new StringContent("3"), name: "AttachToAType");
formDataContent.Add(new StringContent(TestUserId.ToString()), name: "AttachToObjectId");
formDataContent.Add(new StringContent("Test:AttachmentUploadDownloadDeleteShouldWork"), name: "Notes");
formDataContent.Add(new StringContent("[{\"name\":\"test.zip\",\"lastModified\":1582822079618},{\"name\":\"test.png\",\"lastModified\":1586900220990}]"), name: "FileData");
@@ -74,7 +75,10 @@ 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);