1
SOS를 업로드 중입니다. 도움이 필요합니다. 아마존 S3에 이미지를 업로드했는데 정상적으로 작동합니다.하지만 비디오를 업로드하기 위해이 코드를 다시 작성할 때 잘못된 생각이 들었습니다. MOV 파일을 업로드하고 있지만 URL에서 브라우저로 재생하려고하면 다음과 같은 메시지가 표시됩니다. https ... 이미지에 오류가 있기 때문에 표시 할 수 없습니다.ios amazon s3 비디오 파일
- (BOOL) startMediaBrowserFromViewController: (UIViewController*) controller
usingDelegate: (id <UIImagePickerControllerDelegate,
UINavigationControllerDelegate>) delegate{
// Get image picker
UIImagePickerController *mediaUI = [[UIImagePickerController alloc] init];
mediaUI.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
mediaUI.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil];
mediaUI.allowsEditing = YES;
mediaUI.delegate = delegate;
// Display movie files
[controller presentModalViewController:mediaUI animated:YES ];
- (void) imagePickerController: (UIImagePickerController *) picker didFinishPickingMediaWithInfo: (NSDictionary *) info {
[self dismissModalViewControllerAnimated:YES];
UIImage *image = (UIImage*) [info objectForKey:UIImagePickerControllerOriginalImage];
fileName = "anyName.MOV";
NSData *imageData = UIImageJPEGRepresentation(image, 1.0);
@try {
S3PutObjectRequest *por = [[S3PutObjectRequest alloc] initWithKey:fileName inBucket:MY_BUCKET];
por.contentType = @"movie/mov";
por.cannedACL = [S3CannedACL publicRead];
por.data = imageData;
[s3 putObject:por];
}
@catch (AmazonClientException *exception) {
NSLog(@"exception %@", exception);
}
}
탄원 내 실수에 날 지점 :
여기 내 코드입니다.
많은 감사 !!!
S3PutObjectRequest에 액세스하기 위해 AWSSDK에서 어떤 라이브러리를 가져 옵니까? MY_BUCKET에 – c0d3Junk13
을 사용하셨습니까? 내가 AmazonServiceException {RequestId : C25210BBC515D041, ErrorCode : NoSuchBucket, 메시지 : 지정된 버킷이 존재하지 않습니다} –