0

我有一个用作后端的 Rails 应用程序。在我的应用程序中,我有一个使用回形针 gem 的图像上传字段。

它在网络视图中工作正常,但我需要从前端上传图像。我在 POSTMAN Client 中尝试通过以 JSON 格式提供图像路径,但它不起作用。

有人知道上传图片的格式吗?我需要在标题中指定什么吗?


我有的:

从 POSTMAN 客户端上传图片

发帖网址

http://localhost:3000/users.json   ---   POST

使用的标头

Content-Type  ->  application/json

原始数据

{
"image":"C://image/sample.jpg"
}
4

1 回答 1

0

我还使用 rails 作为 iphone 应用程序的后端,现在我可以将图像从应用程序上传到 s3。查看以下链接,您会有所了解。

http://brainbowapps.com/articles/2010/uploading-files-from-iphone-to-rails.html

于 2012-12-31T11:05:46.873 回答