我正在尝试上传图片,邮递员请求采用base64编码,但会生成损坏的图像。上传的代码是:
byte[] byteArray = Encoding.UTF8.GetBytes(image);
MemoryStream stream = new MemoryStream(byteArray);
AddBlobRequest blobRequest = new AddBlobRequest()
{
ContainerName = ContainerName,
SourceFileStream = stream,
BlobName = fileName
};
BlobStorageManager.Instance.AddBlob(blobRequest);