[英]Cloud function to convert a base64 string to zip and extract the contents
I am currently trying to convert a base64 string to a zip file and then extract it.我目前正在尝试将 base64 字符串转换为 zip 文件,然后将其解压缩。
for example would decoding a base64 string to pdf and zip file be completly different process.例如,将 base64 字符串解码为 pdf 和 zip 文件是完全不同的过程。
base64 is just a data encoding format. base64只是一种数据编码格式。 Whatever input data you encoded as base64, will come out on the other side when you decode it.
无论您编码为 base64 的输入数据是什么,都会在解码时从另一侧输出。 So the process for encoding/decoding the file contents as base64 is the same, no matter what the file type is.
因此,无论文件类型是什么,将文件内容编码/解码为 base64 的过程都是相同的。
Asking for a recommendation of a node.js module to help with encoding/decoding is off-topic on Stack Overflow, but if you do a quick google search I'm quite sure multiple good options will show up, such as this highly upvoted answer: How to do Base64 encoding in node.js?在 Stack Overflow 上要求推荐一个 node.js 模块来帮助编码/解码是题外话,但是如果你快速谷歌搜索我很确定会出现多个好的选项,比如这个高度赞成的答案: 如何在node.js中进行Base64编码?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.