【发布时间】:2026-02-01 15:20:09
【问题描述】:
在我的 Ruby on Rails 应用程序中,我尝试通过 POSTMAN REST 客户端以 Base64 格式上传图像。当我发布图像时,我收到 406 Not Acceptable Response。当我检查我的数据库时,图像在那里并且成功保存。
这个错误的原因是什么,我需要在我的标题中指定什么吗?
我的要求:
网址---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*******"
}
【问题讨论】:
标签: json rest http http-response-codes http-status-code-406