I have a problem with uploading big video asset to a server from PhotoLibrary.
I get my asset data as described here, export the video to local document, and then upload.
But when I upload a big video (2 minutes and about 300Mb or more in size), this method causes a crash and I got no reason nor any any information.
I use webDAV to upload files just like this:
// Set up credentials
NSURLCredential *userCredentials = [NSURLCredential credentialWithUser:username
password:password
persistence:NSURLCredentialPersistenceForSession];
NSURLProtectionSpace *space = [[NSURLProtectionSpace alloc] initWithHost:host
port:80
protocol:#"http"
realm:#" webDAV"
authenticationMethod:nil];
[[NSURLCredentialStorage sharedCredentialStorage] setCredential:userCredentials forProtectionSpace:space];
[space release];
// Create the request
NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:#"PUT"];
[request setValue:[self mimetypeForFile:self.filepath] forHTTPHeaderField:#"Content-Type"];
NSNumber *contentLength = (NSNumber *) [[[NSFileManager defaultManager]
attributesOfItemAtPath:self.filepath error:NULL]
objectForKey:NSFileSize];
[request setValue:[contentLength description] forHTTPHeaderField:#"Content-Length"];
if (self.useStreaming)
{
if (self.currentFileStream!=nil)
{
[self.currentFileStream close], self.currentFileStream = nil;
}
self.currentFileStream = [NSInputStream inputStreamWithFileAtPath:self.filepath];
if (currentFileStream!=nil)
{
[request setHTTPBodyStream:currentFileStream];
}
else
{
[request setHTTPBody:[NSData dataWithContentsOfFile:self.filepath]];
}
}
else
{
[request setHTTPBody:[NSData dataWithContentsOfFile:self.filepath]];
}
NSURLConnection* conn = [[NSURLConnection alloc] initWithRequest:request delegate:self];
if (self.currentConnection!=nil)
{
self.currentConnection = nil;
}
self.currentConnection = conn;
[conn release];
[self.currentConnection start];
When the code reache this line:
self.currentFileStream = [NSInputStream inputStreamWithFileAtPath:self.filepath];
[request setHTTPBodyStream:currentFileStream];
OR:
[request setHTTPBody:[NSData dataWithContentsOfFile:self.filepath]];
It crashed.
Do you have any suggestion?
Thanks.
========================
Edit: It crash at setHTTPBody: OR setHTTPBodyStream:
So I think it's about memory leak or something.
================
EDIT2: Now I decide to compress video, I get video data by current method is too large(more than 300mb), But I find use UIImagePickerController select the same video, it just 30mb; So compress is help; I'll try UIVideoEditorController, and will post my result soon;
Completed. the solution is try to compress big video to small file;
1.just like before, export video asset to tmp directory;
2.use UIVideoEditorController to compress the video file;
3.just upload compressed file like the code I post.
That's all.
check following post , where i am uploading image on server, instead of image you can post your video Uploading Image via POST in Objective C
Related
I am developing a application which uses ASIHTTPRequest to download the content from server. When downloading if I move from Portrait to Landscape mode the downloads process is going to stop. I need the download process still to be continued.
I have searched for the solution in stackoverflow but no useful.
How can I solve this problem...
This is the piece of code i am using to download.
NSURL *downloadURL = [publisher contentURLForIssueWithName:issueTitle];
if (!networkQueue) {
networkQueue = [[ASINetworkQueue alloc] init];
}
if(!downloadURL) return;
[self performSelectorInBackground:#selector(read) withObject:nil];
request = [ASIHTTPRequest requestWithURL:downloadURL];
[request setDelegate:self];
[request setDownloadProgressDelegate:progressView];
[request setShowAccurateProgress:YES];
request.shouldContinueWhenAppEntersBackground=YES;
request.allowResumeForFileDownloads=YES;
[request startAsynchronous];
Any help to be appreciated..
I am using ASI to download files and I keep seeing ASIFileManagementError. I am guessing that means that there is something wrong with how I'm building the download paths for my requests but it's not consistent. Sometimes the download works just fine and other times it fails. Even when using the same code on the same device to download the same file! Here is my code.
-(ASIHTTPRequest*)buildDownloadLinkForUpdate:(ContentItem*)update
{
NSString *URLString = [[NSString alloc] initWithFormat:#"%#?%#=%#", update.downloadUrl.absoluteString, #"auth_token", database.userAuthToken];
NSURL *url = [NSURL URLWithString:URLString];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setRequestMethod:#"GET"];
ContentItem* item = [database getItemWithId:update.uniqueId];
[request setDownloadDestinationPath:item.contentPath];
[request setTemporaryFileDownloadPath:[[AppSettings instance].temporaryPath stringByAppendingPathComponent:item.fileName]];
[request setAllowResumeForFileDownloads:TRUE];
[request setShowAccurateProgress: TRUE];
[request setDelegate:[_currentItem progressDelegate]];
return request;
}
-(void)initalizeNetworkQueue
{
if(!networkQueue) networkQueue = [[ASINetworkQueue alloc] init];
[networkQueue cancelAllOperations];
[networkQueue reset];
if([_currentItem progressDelegate])
{
[networkQueue setDownloadProgressDelegate:[_currentItem progressDelegate]];
}
[networkQueue setDelegate:self];
[networkQueue setRequestDidFinishSelector:#selector(networkQueueComplete:)];
[networkQueue setRequestDidFailSelector:#selector(networkQueueFailed:)];
[networkQueue setShowAccurateProgress:YES];
networkQueue.maxConcurrentOperationCount = 1;
}
And then here is the code that actually invokes this:
[self initalizeNetworkQueue];
[networkQueue addOperation:[self buildDownloadLinkForUpdate:_currentUpdate]];
[networkQueue go];
currentState = ContentUpdaterStateDownloading;
Is there something obviously wrong here?
-= UPDATE=-
It's saying that it's failing because it's unable to move the file from the temporary location to the final location.
Download Failed: Failed to move file from '/var/mobile/Applications/33E1DF3C-17F5-432F-8204-A9B53AB5AAE3/Documents/.temp/FileShare+Gate+4.pptx' to '/var/mobile/Applications/33E1DF3C-17F5-432F-8204-A9B53AB5AAE3/Documents/.content/FileShare+Gate+4.pptx'
I had this error before, it was in the connection, it is of type ASINetworkErrorType, it means that the host cannot be reached.
Anyway ASIHttprequest is dead now, you will not find answers for many questions you have, take my advice and go with AFNetworking, it is great and do the job.
I am uploading Image to server. Length Of NSData will depend On the size of image. if image is too big, NSData length will be 6798791 (length will vary). if image is small Request is getting Uploaded to server. if request it too big (Contains very big image) request is not getting uploaded. Below is request format of an image.
<vaayoo:message xmlns:vaayoo="http://www.vaayoo.com<vaayoo:ostype>iphone</vaayoo:ostype><vaayoo:osversion>8</vaayoo:osversion><vaayoo:deviceid>354043043430851</vaayoo:deviceid><vaayoo:sku>lite</vaayoo:sku><vaayoo:xmlversion>1.0</vaayoo:xmlversion></vaayoo:header><vaayoo:vaayoodata xmlns:vaayoo="http://www.vaayoo.com/version2/yooml" datatype="content" mobiletid="8DD7A158-FC05-4588-B4D6-39D93F10E504" formname="frm_reportupload" streamid="A58BFEAF-E566-4ddc-842D-F8C5976FC300"><vaayoo:event type="control_click" name="btn_submit"><vaayoo:action type="form.asyncsubmit" url="http://content.vaayoo.com/AppsPlatForm/PhotoReportCreatorService/PhotoReportCreator.svc/PhotoreportResponse" asyncurl="http://content.vaayoo.com/AppsPlatForm/ConentUploadService/1_1/MyuploadService.svc/UploadData"/></vaayoo:event><vaayoo:data type="formdata" collection="true"><vaayoo:input name="img_0" type="image" filename="01262013035548648.jpg" currentchunk="18" totalchunk="18">VJpLnKnCzUkRBniTapLDOck81q6dqysPLl4ANZEod5Pl+Zc/d6Gq5Em4hsAdRg0+dyak0ZxpN+82aV8xYmQNu5wAelZkmZXGRUjySOFAycDmlJwMtx3qZS0aGmr7DPsciAYI2rz70qTMhBDfNnkelWbV9zHcd2Rj61ObEDeeFXGaty90qVrWRSfBwQmO/NIY2Bxn5e5JqRsKCTyW45oIGBu5B5qE2277hBaFV+WxI2D2xTHmXeSnJHU1OwjkU7idoHbrWfOCqZTjPercJNXbLi5XsSR3BdnLA7j0PtRNHuUOuA5NRRMwIQ4HHJqx8rbQDnHGa54q7bDkk9UyrE5DYJywOetWZ7nLkYLZ4yRxU4hjOcJlh1NIUk3Y2Db0Hc10L3naRN+XRsDcPlWHIxiprWUNEGPVjkiqiOIQyt1PUDrU8Z/d7lwR2BrKXYfK+VO5YdHdVKkb93QnFShdiBnHzE4zUEH77/WHLA529BU0m1PmPzA/Nz/KtYK8eVkadtSRopHjwTkEcdjVa5g2/vJGAVFq4LtNyknC4pk9uJhnqG9KrmcWuZmjmkldFUuGhG45BGd3Uj2qtH8rb87h2NPlDR5VRtTOAtNTEKBCMKTx7VUZRlFsvm59yR3xy7FgaSWYrFtiBU+tICsnyYJYH8KbIGMhOOhHFZOXLqyNL36ldoX8kM+EI5ODk/jUtndG33buQRxRkwKVlBRvQ07yvM2zcjHHSos5XsVK8hWbziPMcAdeBUEl1vj8tEyTxzU8qKDuUktjv0qtdnj5UC7fvEd6cG1p0QPRW7FdGEUh8zPy8D3qZxvVWVtvc81FCQ8vnE/KrA7etL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YBwOeKazuwG0/JnOc9aglQjc/r2zSUnHVmcZNa2LwCTOiueevFJPnay8bQaobiH3qxBxwpNTSzloWGAWUZypquaN7s6YxVncrTokhC52kHPFSBh5zKxzhcikj/eZIPNDRrK6kghweOwNZ6sqTXK31K7y7ZMqDjH3RSy/OyHoD19RU7W6SL8jlSB1NVizAmMr0OMjvUuxipe8uYdcnY8TM2QeT61ahuAgyR8jDgDtWZdsyyRjGTnAqd5WhAbHy9D709Zajc002izHKs0hCqAR1qaCZwzcY5/Cq1uyGE4ypPcCh7sZ2DhDxVcu1yrJe8aNwPOCYOfYdqkjlfegjjJPcg9KrWxKRnzGwW4XHpVmNRnIJLVfKudpmEmlqbcBXYqjBZ+pz0qlfRXOWGEwp6g5yKjJMYDAFSe4qUaiJEc7cnBBPY1e5lzXlZGLcQKrIwJbcM88Gq8twWxEQSnvVu5mLyAP1zge1ZV022XYGxzwRzUp62Z0StJX2NBkWNgF4OM59KgLEvhj9G9ajE0e1v3jNJjaB0FTLNHJGFIzt/nUWSVkZxl3YkjtGqBTjk5pplzEFBy2eSaSWYgBwgaNjjk4qs0w8zPCqR0HIpe7G9zT4viLJnSKE4bLdaybskl5Eycnt1NMuLvDEDBX9aghuiW/uHtVW05kTb2istEOluPPUZG3jvUFq4ILFvkHy4p7fv3JJyajZBCCzD5OpA9ajnjJq25cocsk+x//Z</vaayoo:input><vaayoo:input name="txt_rpt_name" type="text" textmode="multiline">anil dairy</vaayoo:input></vaayoo:data></vaayoo:vaayoodata></vaayoo:message>
Below is the method which is writing the data to server.
-(BOOL)write:(NSData *)data toURI:(NSString *)URI
{
BOOL retVal = NO;
NSString* requestDataLengthString = [[NSString alloc] initWithFormat:#"%d", [data length]];
NSLog(#"Data length is %#",requestDataLengthString);
NSLog(#"Urlis %#",URI);
NSRange range = [URI rangeOfString:#"http"];//Is http?
if(range.location != NSNotFound)
{
//Yes, http
NSMutableURLRequest *httpRequest = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString:URI]];
[httpRequest setHTTPMethod:#"POST"];
[httpRequest setHTTPBody:data];
[httpRequest setValue:#"application/xml" forHTTPHeaderField:#"Content-Type"];
[httpRequest setValue:requestDataLengthString forHTTPHeaderField:#"Content-Length"];
NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:httpRequest delegate:self];
[theConnection release];
[httpRequest release];
if (theConnection)
{
receivedData=[[NSMutableData data] retain];
retVal = YES;
}
else
{
NSError *error = [NSError alloc];
NSLog(#"Connection failed! Error - %# %#",
[error localizedDescription],
[[error userInfo] objectForKey:NSURLErrorFailingURLStringErrorKey]);
[error release];
retVal = NO;
}
}
return retVal;
}
What am i doing wrong in Write method ? it works fine for small images, but doesn't work for bigger images, not even getting any kind of exception if i try to upload big images. How to troubleshoot this problem. Help me out plz.. Thanks in advance..
Have you tried using the asynchronous upload with NSURLConnection delegates? Probably the error might show up there. What language are you using for the webservice? It could be the setting on your webserver that makes it fail to upload big image. Try to see the maximum request length that is set on your server. If it's smaller than the image size, then it would fail.
Use NSTimeoutInterval and try its working:
NSMutableURLRequest *request1 = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:1000.0];
Instead of using:
[httpRequest setHTTPBody:data];
Use:
NSInputStream *stream = [[NSInputStream alloc] initWithFileAtPath:filePath];
request setHTTPBodyStream:stream];
Apple has an example of this.
I am trying to figure out how to send data to the server but currently without any progress.
What I know
On the server I have got some php script that return me data in response
for example with this URL: http://test.com/mobile_api/register
this script get next parameters:
id
name
info
time
so the string which I need looking like below
http://test.com/mobile_api/register?id=1000&name=alex&info=1.0&time=10000
What is best way to send this is string on the server
Now I'm trying to use ASIHTTPRequest. Can anybody send an example how to create correct request with my parameters.
This sample code should help you
-(void)sendRequest
{
int userId=10, time=10000;
NSString *name = #"ABC";
float info = 1.0;
NSString *urlString = [NSString stringWithFormat:#"http://test.com/mobile_api/register?id=%d&name=%#&info=%f&time=%d",userId,name,info,time];
ASIHTTPRequest *request = [[ASIHTTPRequest alloc] initWithURL:[NSURL URLWithString:urlString]];
//You need to add ASIHTTPRequestDelegate in header(.h) file
[request setDelegate:self];
[request startAsynchronous];
}
- (void)requestFinished:(ASIHTTPRequest *)request
{
// Use when fetching text data
NSString *responseString = [request responseString];
// Use when fetching binary data
NSData *responseData = [request responseData];
}
- (void)requestFailed:(ASIHTTPRequest *)request
{
NSError *error = [request error];
}
everyone! My english is poor and sorry fot that.
I want implement a function in my test iOS application.
There is a .NET Webservice API just like
"https://xxx.xxx.xx.xxx/FMS/Pages/Service/FMService.svc/Login"
I want to connect the API with two parameters:user and pass
using the GET method,and the url will be like:
"https://xxx.xxx.xx.xxx/FMS/Pages/Service/FMService.svc/Login?user=xxx&pass=xxx"
if login, the Webservice will return a JSON value just like {"d":"success"}
if not, it will also return a JSON value like {"d":"failure"}
I am using the ASIHTTPRequest framework and JSON framework
I dont know how to implement the function. So please help me, thanks a lot.
Best wishes!
NSURL *url = [NSURL URLWithString:#"https://192.168.1.245/FMS/Pages/Service/FMService.svc/Login?user=jiangxd&pass=123456"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request addRequestHeader:#"Accept" value:#"application/json"];
[request addRequestHeader:#"Content-Type" value:#"application/json"];
[request setRequestMethod:#"GET"];
[request setDelegate:self];
[request startAsynchronous];
NSString *responseString = [request responseString];
NSDictionary *responseDict = [responseString JSONValue];
NSString *unlockCode = [responseDict objectForKey:#"d"];
NSLog(#"%#",unlockCode);
The unlockCode is always null... and I dont understand why!
NSURL *url = [NSURL URLWithString:#"https://192.168.1.245/FMS/Pages/Service/FMService.svc/Login?user=jiangxd&pass=123456"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request startSynchronous];
NSError *error = [request error];
if (!error)
{
NSString *responseString = [request responseString];
NSDictionary *responseDict = [responseString JSONValue];
NSString *unlockCode = [responseDict objectForKey:#"d"];
NSLog(#"%#",unlockCode);
}
else
{
NSLog(#"%#",[error description]);
}
And now I change startAsynchronous to startSynchronous but there is also an error:
Error Domain=ASIHTTPRequestErrorDomain Code=1 "A connection failure occurred: SSL problem (Possible causes may include a bad/expired/self-signed certificate, clock set to wrong date)" UserInfo=0x6b81640 {NSUnderlyingError=0x6b811b0 "The operation couldn’t be completed. (OSStatus error -9807.)", NSLocalizedDescription=A connection failure occurred: SSL problem (Possible causes may include a bad/expired/self-signed certificate, clock set to wrong date)}
NOTICE:The url is https, not http!(Is this the reason that I get an error?)
But if I access the url directly with browser, the Webservice will return the right value...
Thank you!
You should probably try it, and then post your code. You're asking someone to write this entire function for you, and I don't think that that is the purpose of this site.
Secondly, the developer behind the ASIHTTPRequest is no longer supporting it. Unless the community picks up, you might want to just learn how to do NSURLConnections from scratch.
Edit: There we go. So, you're doing this asynchronosly which means that when you start it, you're not immediately going to have the response. Have you setup your callbacks to process the response?
- (void)requestFinished:(ASIHTTPRequest *)request
{
// Use when fetching text data
NSString *responseString = [request responseString];
// Use when fetching binary data
NSData *responseData = [request responseData];
}
- (void)requestFailed:(ASIHTTPRequest *)request
{
NSError *error = [request error];
}