我正在尝试使用axios发布两个输入,我想在发送它们之前对它们进行base64编码。
最佳答案
自v6以来不推荐使用const encodedString = new Buffer('your string here').toString('base64');
使用代替const encodedString = Buffer.from('your string here').toString('base64');
关于reactjs - 如何在React中对输入进行base64编码?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44458874/