Experimental SSL support
This commit is contained in:
@@ -26,14 +26,14 @@
|
||||
do {
|
||||
NSString *filename = [self valueForQueryItemWithName:@"filename"];
|
||||
if ([filename length] == 0) {
|
||||
NSLog(@"No filename provided");
|
||||
MBIMLogInfo(@"No filename provided");
|
||||
response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
||||
break;
|
||||
}
|
||||
|
||||
NSData *attachmentData = self.requestBodyData;
|
||||
if ([attachmentData length] == 0) {
|
||||
NSLog(@"No attachment data in request");
|
||||
MBIMLogInfo(@"No attachment data in request");
|
||||
response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
||||
break;
|
||||
}
|
||||
@@ -42,14 +42,14 @@
|
||||
NSURL *localURL = [NSURL fileURLWithPath:localPath];
|
||||
BOOL success = [attachmentData writeToURL:localURL atomically:NO];
|
||||
if (!success) {
|
||||
NSLog(@"Error writing attachment to temporary directory");
|
||||
MBIMLogInfo(@"Error writing attachment to temporary directory");
|
||||
response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
||||
break;
|
||||
}
|
||||
|
||||
NSString *guid = [[IMFileTransferCenter sharedInstance] guidForNewOutgoingTransferWithLocalURL:localURL];
|
||||
if (!guid) {
|
||||
NSLog(@"There was some problem shuttling the file to IMCore");
|
||||
MBIMLogInfo(@"There was some problem shuttling the file to IMCore");
|
||||
response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user