在我的Ruby on Rails应用程序中,我尝试以Base64格式通过POSTMAN REST客户端上传图像.当我发布图像时,我得到了406 Not Acceptable Response.当我检查我的数据库时,图像就在那里并成功保存.
这个错误的原因是什么,我需要在标题中指定什么?
我的请求:
网址--- http://localhost:3000/exercises.json
标题:
Content-Type - application/json
Run Code Online (Sandbox Code Playgroud)
原始数据:
{
"exercise": {
"subbodypart_ids": [
"1",
"2"
],
"name": "Exercise14"
},
"image_file_name": "Pressurebar Above.jpg",
"image":"******base64 Format*******"
}
Run Code Online (Sandbox Code Playgroud)