Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-04-2009, 04:24 PM   #5 (permalink)
FlyingDiver
Former NeXTStep Developer
 
Join Date: Mar 2009
Posts: 997
FlyingDiver will become famous soon enough
Default

Quote:
Originally Posted by jcafaro10 View Post
Thanks for the response. What makes mine asynchronous and yours synchronous? I just got my download code from the apple website. Is one way better than the other?
I'm using sendSynchronousRequest:, you're using initWithRequest:. In mine, it will sit in that method until it's done. Which is not a good thing for a large transfer, but mine is quite small. For a fair amount of data, yours is better.

Quote:
Originally Posted by jcafaro10 View Post
Also looking at the code, it looks like you're making a string out of your login information and some other strings. What does that actually do? I don't really understand how a lot of this works. I need to actually upload a file.
That's the actual data. Does it really need to be a file when it gets to the server, or is your server side going to read the data and do something with it? How are you creating the file on the phone in the first place?

There are ways to encode actual files into an POST request, but you'll need to look up the appropriate parameters to set in the NSURLRequest object. It's much more complicated. I found this example with a quick Google search: Cocoabuilder - (Ben Lachman) Re: File upload with NSURLRequest fails

joe
FlyingDiver is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,633
Threads: 94,090
Posts: 402,804
Top Poster: BrianSlick (7,990)
Welcome to our newest member, nor9849
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:27 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.