I am working on a REST API, trying to load a user image using
- grape micro frame
- paperclip gem but it does not work showing this error.
- rails version - 3.2.8
No handler found for #<Hashie::Mash filename="user.png" head="Content-Disposition: form-data; name=\"picture\"; filename=\"user.png\"\r\nContent-Type: image/png\r\n" name="picture" tempfile=#<File:/var/folders/7g/b_rgx2c909vf8dpk2v00r7r80000gn/T/RackMultipart20121228-52105-43ered> type="image/png">
I tried checking the clip with the controller and it worked, but when I try to download via grape api it does not work, my message header is multipart / form-data p>
My download code is
user = User.find(20) user.picture = params[:picture] user.save!
So if it is not possible to upload files via grapes, is there an alternative way to upload files via REST api?
source share