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 PWAPPv2.Source.DataObjects;
|
||||
using Microsoft.Identity.Client;
|
||||
using PWAPPv2.Source.DataObjects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -49,5 +50,29 @@ namespace PWAPPv2.Source.Attachments
|
||||
return attachment;
|
||||
|
||||
}
|
||||
|
||||
public static PWBaseAttachment BuildBaseAttachment(string token, PWImage image)
|
||||
{
|
||||
PWBaseAttachment attachment = new PWBaseAttachment();
|
||||
attachment.AttToken = token.Replace("\"", "");
|
||||
attachment.ThumbExists = true;
|
||||
attachment.ZoomExists = true;
|
||||
attachment.FileDate = "";
|
||||
attachment.FileName = image.ShortFileName();
|
||||
attachment.FileType = image.FileType;
|
||||
return attachment;
|
||||
}
|
||||
|
||||
public static PWBaseAttachment BuildBaseAttachment(string token, PWPdf pdf)
|
||||
{
|
||||
PWBaseAttachment attachment = new PWBaseAttachment();
|
||||
attachment.AttToken = token.Replace("\"", "");
|
||||
attachment.ThumbExists = false;
|
||||
attachment.ZoomExists = true;
|
||||
attachment.FileDate = "";
|
||||
attachment.FileName = pdf.ShortFileName();
|
||||
attachment.FileType = "application/pdf";
|
||||
return attachment;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user