update nach anpassungen clsgetdoc
This commit is contained in:
27
Helper/clsFileHelper.cs
Normal file
27
Helper/clsFileHelper.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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 "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user