Can I upload a file to the server without converting it to NSData?

I am developing an application in which I have to upload a file to the server from the device, I know how to send the file to the server using the following NSMutableURLRequest , but is it possible to store the file on the server without conversion to NSData ??

I saw How to upload an image to asp.net server without converting to NSData on iPhone , but did not find any solution.

+6
source share
2 answers

The networks are analog, and the computer and digital devices do not understand that for them everything is digital data, so I think now you understand that it is simply impossible if you have any specific problem of converting your file to data and get them back you can go ahead

0
source

Data on the network is always transmitted in bytes, regardless of any platform. NSData will finally be converted to byte data before being sent over the network. At a higher level, your data should be in NSData format, but at a lower level, in bytes .. So in ios it will be either Bytes of Data (if you use NSInputstream to load data) or NSData (which will finally be converted to Bytes again and sent over the network)

0
source

Source: https://habr.com/ru/post/959444/


All Articles