How do I access just the MIME ext part of UIImagePickerControllerReferenceURL? This is what I get when I NSLog -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
UIImagePickerControllerReferenceURL = "assets-library://asset/asset.PNG?id=F61B754A-705C-4BFB-9965-DE34C7B93A2B&ext=PNG";
I just want access to the MIME type. When I send an image to my webserver using:
NSData *imageData = UIImageJPEGRepresentation(_selectedImage, 1.0);
//non-important ASIFormDataRequest set-up
[request setData:imageData withFileName:uniqueString andContentType:@"image/jpeg" forKey:@"photo"];
The picture comes in all messed up. But when I use :
NSData *imageData = UIImagePNGRepresentation(_selectedImage);
//non-important ASIFormDataRequest set-up
[request setData:imageData withFileName:uniqueString andContentType:@"image/png" forKey:@"photo"];
The picture comes in fine. But all my uploaded photos won't be PNG though.