C
C#2y ago
Danielcik

Weird ToBase64String behavior

I have an mp3 file, which is perfectly normal, and plays fine. I use this code to convert it to a base64 string:
Byte[] bytes = await File.ReadAllBytesAsync("video.mp3");
String file = Convert.ToBase64String(bytes);
Byte[] bytes = await File.ReadAllBytesAsync("video.mp3");
String file = Convert.ToBase64String(bytes);
When I try to play it as an audio in JS, it only plays 3 seconds, and then skips to the end. I also tried to use https://base64.guru/converter/decode/file to see if it will be different, I paste the base64 string, but it isn't, it plays 3 seconds, then stops. What am I doing wrong?
Base64 to File | Base64 Decode | Base64 Converter | Base64
Decode Base64 to file online using a free decoding tool
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server