小编Tom*_*mas的帖子

成功将base64图像保存到Azure Blob存储,但blob图像始终打破/小白框

我有一个图像转换为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时,图像仍然被破坏了.有任何想法吗 ?

blob azure azure-storage-blobs node.js azure-web-sites

2
推荐指数
1
解决办法
2925
查看次数