AFNetworking 2.0 multipart request body blank

前端 未结 3 930
伪装坚强ぢ
伪装坚强ぢ 2021-02-10 00:47

Similar to this issue.

Using AFNetworking 2.0.3 and trying to upload an image using AFHTTPSessionManager\'s POST + constructingBodyWithBlock. For reasons unknown, it se

3条回答
  •  既然无缘
    2021-02-10 01:15

    I was running into this problem myself, and was trying both methods and the suggested method here...

    Turns out, it was as simple as changing the appended data "name" key to "file" instead of the filename variable.

    Be sure your data key matches, or you will see the same symptom of an empty data set.

提交回复
热议问题