Uploading an image from Android (with Android Asynchronous Http Client) to rails server (with paperclip)

前端 未结 3 928
误落风尘
误落风尘 2020-12-13 07:47

I\'m trying to upload an image file via http post method from android device to rails server. But posting an image is not working. More specifically, the post parameter (inc

3条回答
  •  渐次进展
    2020-12-13 08:13

    You can upload the Images via the MultipartEntity.

    MultipartEntity, part of HttpMime 4.0 and later. Allows you to put multiple parts, separated by boundary strings and encoded using given charset, into httppost request.

    For more info and how to use Multipart, see this and this.

提交回复
热议问题