简体   繁体   中英

C# Base64 String file extension mime type

When I send a base64 string to an web api, do I need to pass the mime type eg jpg to define the file extension when the file is saved? if not how would I know what file type to save it as?

您可以在单独的变量中发送文件类型,在 base64 字符串前面加上分隔符,然后提取它,或者将 base64 字符串转换为字节数组,然后读取前几个字节以确定图像格式。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM