Fixed issue with attachment tokens. Changed how attachments are handled to be more modular. Added support for PNG files.

This commit is contained in:
2024-02-09 19:02:09 -05:00
parent 40f9db3ea4
commit f31302438d
10 changed files with 410 additions and 74 deletions
+4 -6
View File
@@ -1,6 +1,6 @@
namespace PWAPPv2.Source.DataObjects
{
class Attachment
public class Attachment
{
APICredentials Credentials;
public PWImage image { get; set; }
@@ -28,7 +28,7 @@
public string ToJsonString()
{
if (fileType == "image/jpeg")
if (image != null)
{
return "\"{" + Credentials.BuildJsonBodyContents() +
",'UserNum':'API'," +
@@ -37,10 +37,8 @@
"'ThumbExists':'1'," +
"'ZoomExists':'1'," +
"'FileDate':''," +
"'FileType':'" + fileType + "'," +
"'Base64FileContents':'" + image.GetBase64String() + "',\n" +
"'Base64ThumbContents':'" + image.GetBase64ThumbString() + "',\n" +
"'Base64ZoomContents':'" + image.GetBase64ZoomString() + "'}\"";
"'FileType':'" + image.FileType + "'," +
image.GetJsonContents() + "}\"";
}
else
{