在Trello Rest API中使用base64字符串创建附件

问题描述

我有一个base64字符串格式的图像文件。我正在尝试将其作为trello的附件上传

attach = RestClient.post "https://api.trello.com/1/cards/#{id_model}/attachments?key=#{developer_key}&token=#{user_token}",{file: attachment_data,name: file_name}

但是,它没有上传图像,而是上传了具有base64的文件

enter image description here

我尝试使用Base64.decode64(attachment_data)将base64解码为二进制,它只是将解码后的字符串作为文件上传

enter image description here

在Trello Rest API中使用base64字符串创建附件的正确方法是什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)