Shi*_*rma 8 django request image-upload postman
我正在尝试使用POSTMAN上传图像.我成功使用了表单数据,但没有使用原始JSON格式传递数据.
通过POSTMAN中的表单数据请求:

请求通过curl:
curl -X POST -H "Content-Type:multipart/form-data" -F "profile_image=@/home/shivani/Pictures/Wallpapers/8018.jpg" http://127.0.0.1:8000/api/users/1/image/
{"message":"Image Uploaded successfully.","profile_image":"http://res.cloudinary.com/aubergine-solutions/image/upload/v1430204993/w0oxhv6beaxd14twrxmi.jpg"}~
Run Code Online (Sandbox Code Playgroud)
当我发送原始请求时:

虽然我在Django设置中添加了MultiPartParser,但是出现以下错误:

任何人都可以帮忙解决这个问题吗?
| 归档时间: |
|
| 查看次数: |
23932 次 |
| 最近记录: |