Hi,
If you've got the byte[] from the base64 string then you
can just write it to the file e.g. by FileStream.
private static void Base64ToFile(string base64String, string dstFilePath) {
byte[] dataBuffer=Convert.FromBase64String(base64String);
using( FileStream fileStream=new FileStream(dstFilePath
, FileMode.Create
, FileAccess.Write) ) {
if( dataBuffer.Length>0 ) {
fileStream.Write(dataBuffer, 0, dataBuffer.Length);
}
}
}
HTH
Marcin
(E-Mail Removed) napisał(a):
> I am getting a huge file attachment from SWA web service, obviously
> in Base64. Is there a way to decode the Base64 string directly to a
> file (FileStream or similar) instead to byte array?
>