views:

27

answers:

1

Hi, everyone,

I want to ask a question about the objective C. I have create a .csv file and I want to upload to a server. However, I have no idea on how to do it. Can anyone provide any example or library for me to do? Thank you very much.

+2  A: 

I think you will have an easier time doing this with ASIHTTPRequest, specifically, take a look at this sample code that shows how to upload a file.

Then, for actually initiating the request, take a look at creating an asynchronous request.

Jorge Israel Peña
+1 I've had good experience with that class.
Matt Williamson
@Blaenk, thank you for your help. But I am not going to use the ASIHTTPRequest, does there is any other for the objective C provide?
Questions
Just in case you're confused, ASIHTTPRequest is Objective-C: you can use it for any Mac or iPhone project.
Jorge Israel Peña
@Blaenk, thank you for your reply. Due to some reasons, I cannot use it. Therefore, would you provide another suggestions for me? thank you.
Questions
You can probably use NSMutableRequest and NSMutableData to construct the POST data. Take a look at this page: http://cocoadev.com/index.pl?HTTPFileUpload
Jorge Israel Peña
@Blaenk, thank you for your reply. I found that it is very useful.
Questions
You're welcome :)
Jorge Israel Peña