In Cocoa, how would you go about POSTing a file big enough to cause allocation issues while still appending the Content-Disposition and Content-Type flags in code?
Right now, we're allocating an NSMutableURLRequest, setting the headers, initializing an NSMutableData object for the body, appending the bytes for the initial flags in the body, and then appending the bytes of a file into the body. One of the files we need to send regularly is simply too big avoid allocation issues.
I know that NSMutableURLRequest can also take an NSInputStream to the body, but that would still mean that I'd have to create a new file, append the necessary flags, and then copy the entire original file into it. This is not a practical solution and I'd like to avoid it.