I am able to upload image to RoR application(using carrierwave for image upload) through CURL request,
curl -v -H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-F "photo[display_photo]=@/home/Pictures/images.jpeg" \
-F "photo[name]=Flower" http://localhost:3001/photos.json
But i wanted to modify above command as,
curl -v -H "enctype: multipart/form-data" \
-H "Accept: application/json" \
-H "Content-type: application/json" \
-d '{"photo":{
"name":"Flower",
"display_photo":@"/home/Pictures/images.jpeg"
}}' POST http://localhost:3001/photos.json
How to achieve it!!!