Fix gestione allegati e creato metodo di esportazione log
This commit is contained in:
@@ -56,16 +56,17 @@ public class IntegrySteupService(IIntegryApiRestClient integryApiRestClient) : I
|
||||
|
||||
#endregion
|
||||
|
||||
public Task UploadFile(string activityId, byte[] file, string fileName)
|
||||
public async Task UploadFile(string activityId, byte[] file, string fileName)
|
||||
{
|
||||
var queryParams = new Dictionary<string, object> { { "activityId", activityId } };
|
||||
|
||||
using var content = new MultipartFormDataContent();
|
||||
var content = new MultipartFormDataContent();
|
||||
var fileContent = new ByteArrayContent(file);
|
||||
fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data");
|
||||
content.Add(fileContent, "file", fileName);
|
||||
|
||||
return integryApiRestClient.Post<object>($"{BaseRequest}/uploadAttachment", content, queryParams!);
|
||||
await integryApiRestClient.Post<object>($"{BaseRequest}/uploadAttachment", content, queryParams!);
|
||||
content.Dispose();
|
||||
}
|
||||
|
||||
public Task DeleteScheda(string activityId) =>
|
||||
|
||||
Reference in New Issue
Block a user