28 lines
706 B
C#
28 lines
706 B
C#
using NLog.LayoutRenderers;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Helper
|
|
{
|
|
public class clsFileHelper
|
|
{
|
|
public string save_temp_file(string data, string dokumentid, string temppath, string extension)
|
|
{
|
|
|
|
string filename = temppath+ DateTime.Now.ToString("yyyyMMddhhmmss") + "_" + dokumentid + "." + extension;
|
|
try
|
|
{
|
|
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(data));
|
|
return filename;
|
|
}
|
|
catch
|
|
{
|
|
return "";
|
|
}
|
|
}
|
|
}
|
|
}
|