我使用Odoo并上传文本文件,我需要用Base64编码,但编码删除所有“\ n”的元素,然后我在一个一切线。我怎么能离开这些新线? with open("Invoices.txt") as text_file:
attachment=text_file.read()
new_attach =attachment.encode('base64')
如何以十六进制在C#中正确编码SHA-256散列? private static string ToHex(byte[] bytes, bool upperCase)
{
StringBuilder result = new StringBuilder(bytes.Length * 2);
for (int i = 0; i < bytes.Length; i++)
我想用Laravel将图像转换为base 64。我从表单中获取图像。 我在我的控制器试过这样: public function newEvent(Request $request){
$parametre =$request->all();
if ($request->hasFile('image')) {
if($request->file('image')->