在我的Ruby on Rails应用程序中,我试图通过Base64格式的POSTMAN REST客户端上传一张图像。当我张贴图像时,我得到了406不可接受的响应。当我检查我的数据库,图像在那里,并成功保存。
这个错误的原因是什么,我需要在我的头文件中指定什么吗?
我的要求:
URL——http://localhost:3000/exercises.json
标题:
Content-Type - application/json
原始数据:
{
"exercise": {
"subbodypart_ids": [
"1",
"2"
],
"name": "Exercise14"
},
"image_file_name": "Pressurebar Above.jpg",
"image":"******base64 Format*******"
}