Fixed issue with attachment tokens. Changed how attachments are handled to be more modular. Added support for PNG files.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user