Images working
This commit is contained in:
@@ -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() + "'}\"";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user