Sending file from iOS to PHP using POST

后端 未结 3 533
慢半拍i
慢半拍i 2020-12-13 23:01

I\'m trying to send an audio file to a PHP server. Here is the Objective-C code:

NSData *data = [NSData dataWithContentsOfFile:filePath];

NSLog(@\"File Size         


        
3条回答
  •  一个人的身影
    2020-12-13 23:19

    Try encoding your binary data before you send it over the pipe (and then decode when it gets to the other end). See this SO thread for ideas for Base64 encoding code.

提交回复
热议问题