我有一个图像转换为base64我试图使用createBlockBlobFromText上传到我的azure blob存储.
self.blobServer.createBlockBlobFromText(containerName, fileName, baseStrChars, { contentSettings: { contentType: 'image/jpeg' } }, function(error, result, response) {
if (error) {
console.log(error);
}
console.log("result", result);
console.log("response", response);
});
Run Code Online (Sandbox Code Playgroud)
我的新jpeg图像出现在blob存储容器中,但是当我转到blob图像URL时,我总是得到这个.
我的容器的访问策略设置为容器,我将base64字符串粘贴到base64到图像转换器,并显示正确的图像.问题似乎是我创建blob而不是base64字符串的方式.
我很疑惑为什么整个流程似乎都有效,但是当我转到URL时,图像仍然被破坏了.有任何想法吗 ?