signature.SaveAsync
I see where to set file image type and file name but not how to save signature image in specific folder
thanks
|
private async Task onSave()
{
await signature.SaveAsync(fileType: SignatureFileType.Png, fileName: "Enter the file name here" );
} |
I understood how to set file type and name, the issue is it saves the signature file in downloads folder, how do I specify a different folder to save file.
I have tried using full path and name in filename, it still writes image file in downloads folder.
thanks
|
private async Task onSave()
{
//To save in a specific folder
string path = @"D:\Download\";
string base64image = await signature.GetSignatureAsync(SignatureFileType.Png);
var filepath = path + "signature.png";
using (FileStream fs = new FileStream(filepath, FileMode.CreateNew))
{
using (BinaryWriter bw = new BinaryWriter(fs))
{
string convert = base64image.Replace("data:image/png;base64,", String.Empty);
byte[] data = Convert.FromBase64String(convert);
bw.Write(data);
bw.Close();
}
}
clearDisabled = true;
} |
thank you