Home > Net >  On the c # the base64 into mp3 display is invalid file how to return a responsibility?
On the c # the base64 into mp3 display is invalid file how to return a responsibility?

Time:09-21

Invalid file can't play with, but open the show, but the use of system with Windows Media Player can play normal, put the mp3 in also can't play with web page on the server, estimate what reason be?
 
This is the code, did not involve encoding things ah
Public static void Base64ToFile (string source, the string filename, string filepath)
{
Try
{

Byte [] bytes=the Convert. FromBase64String (source);
Using (var fs=new FileStream (filepath + filename, FileMode. Create, FileAccess. Write))
{
Fs. Write (bytes, 0, bytes. Length);
Fs. Flush ();
}
}
The catch (Exception e)
{

}
}

CodePudding user response:

Using original Ue32 binary editor to open the mp3 files and you generate mp3 files, compare the files, a preliminary estimate is 0 a 0 d conversion issues, will write two carriage returns some method,

CodePudding user response:

Using original Ue32 binary editor to open the mp3 files and you generate mp3 files, compare the files, a preliminary estimate is 0 a 0 d conversion issues, will write two carriage returns some method,

CodePudding user response:

Using original Ue32 binary editor to open the mp3 files and you generate mp3 files, compare the files, a preliminary estimate is 0 a 0 d conversion issues,

CodePudding user response:

You may have problem when I read the file
  •  Tags:  
  • C#
  • Related