Images working

This commit is contained in:
Matthew Burke
2023-07-27 18:59:51 -04:00
parent 1b65e9bb83
commit 09d86b86c2
7 changed files with 300 additions and 12 deletions
+40
View File
@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PWAPPv2.Source.DataObjects
{
class Attachment
{
APICredentials Credentials;
PWImage image;
string Token;
public Attachment(APICredentials credentials, PWImage pwImage, string token)
{
Credentials = credentials;
image = pwImage;
Token = token;
}
public string ToJsonString()
{
return "\"{" + Credentials.BuildJsonBodyContents() +
",'UserNum':'API'," +
"'AttToken':'" + Token.Replace("\"", "") + "'," +
"'FileName':'" + image.ShortFileName() + "'," +
"'ContentType':'_1'," +
"'ThumbExists':'1'," +
"'ZoomExists':'1'," +
"'FileDate':''," +
"'Base64FileContents':'" + image.GetBase64String() + "',\n" +
"'Base64ThumbContents':'" + image.GetBase64ThumbString() + "',\n" +
"'Base64ZoomContents':'" + image.GetBase64ZoomString() + "'}\"";
}
}
}