Modified how attachments are pushed to the API.
Added support for BMP and GIF image types.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user