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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-09-2011, 08:14 AM   #1 (permalink)
Registered Member
 
Join Date: Dec 2010
Posts: 6
Zaffro is on a distinguished road
Default Uploading video from iPhone to web.

Ill start with I have a website where a user can log in, select a video they have recorded on the PC it then uploads the binary into an SQL database for storage.

I have an app that allows a user to select a pre-recorded video or record a new video.

I have had a poke about and and I cant find anything concrete on how to then upload the video from the iPhone to the website. The site has its own php script that takes videos and places them into an SQL file I just need to send the video from the phone to the sites php script and then let that add it to the SQL file.

Compression and logging in on the phone ill deal with later.

Thanks, Zaff =]
Zaffro is offline   Reply With Quote
Old 09-11-2011, 05:50 PM   #2 (permalink)
Registered Member
 
Join Date: Dec 2010
Posts: 6
Zaffro is on a distinguished road
Default

Bump.
Zaffro is offline   Reply With Quote
Old 09-11-2011, 07:34 PM   #3 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 577
Speed is on a distinguished road
Default

Here is what I use to synchronously POST NSData to a web script using ASIHTTPRequest.

Code:
    NSData *data = nil; // replace nil with your NSData
    NSString *urlStr = [[NSString alloc] initWithFormat:@"http://www.example.com/"];
    NSURL* url = [NSURL URLWithString:[urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
    [urlStr release];
    ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
    [request addRequestHeader:@"Content-Type" value:@"application/octet-stream"];
    [request setTimeOutSeconds:600]; // 10 minutes
    [request appendPostData:data];
    [request setUploadProgressDelegate:aUIProgressView];
    [request setShowAccurateProgress:YES];
    [request startSynchronous];
Speed is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 415
11 members and 404 guests
apatsufas, Eclectic, fiftysixty, JackReidy, jeroenkeij, Sami Gh, teebee74, tim0504, UMAD, yomo710, yuncarl28
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,672
Threads: 94,121
Posts: 402,904
Top Poster: BrianSlick (7,990)
Welcome to our newest member, yuncarl28
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:59 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0