Modified how attachments are pushed to the API.

Added support for BMP and GIF image types.
This commit is contained in:
goomatt33
2024-03-25 13:21:14 -04:00
parent f31302438d
commit 205b3d8014
10 changed files with 202 additions and 17 deletions
+14 -2
View File
@@ -1,4 +1,5 @@
using System;
using PWAPPv2.Source.Attachments;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -7,7 +8,7 @@ using System.Threading.Tasks;
namespace PWAPPv2.Source.DataObjects
{
public class PWPdf
public class PWPdf : PWFile
{
public string path;
@@ -23,6 +24,17 @@ namespace PWAPPv2.Source.DataObjects
return Convert.ToBase64String(bytes);
}
public List<PWFileUpload> GetFileUploads(string attToken, string ContentId)
{
List<PWFileUpload> fileUploads = new List<PWFileUpload>();
PWFileUpload file = new PWFileUpload();
file.Base64Content = GetBase64String();
file.ContentId = ContentId;
file.AttToken = attToken;
fileUploads.Add(file);
return fileUploads;
}
public string ShortFileName()
{
return path.Substring(path.LastIndexOf("\\") + 1);