Android send photo using HttpPost/HttpGet

前端 未结 1 1311
生来不讨喜
生来不讨喜 2021-01-16 04:55

I need to send a photo from a file stored in the SDCARD to an external Api. In order to do this, i\'m using the following code:

String responseStr = null;
           


        
1条回答
  •  醉梦人生
    2021-01-16 05:19

    The problem may be the semicolon in the content type:

    fileentity = new FileEntity(file,"image/jpeg;");
                                                ^
    

    0 讨论(0)
提交回复
热议问题