|
|
Thread Tools | Display Modes |
|
#1
|
|
|
Beginner grinner
|
System error 5 with proven Objective-C code when uploading a photo
My iphone app PhotoKing has been live for many months. When testing some iOS 6 changes unrelated to SmugMug code photo uploads are failing:-
code = 5; message = "system error"; method = "smugmug.images.upload"; stat = fail; I can create an album & view photos so everything else works & I use very similar code for PhotoBucket and Tumblr that also still works for photo upload. I reinstalled the app & logged on again just to be sure. As my code has not been changed I would like to ask if there is anything different at the server end that's not obvious to me? Any parameter changes etc? I have been back through the api docs & ran lots of debugging on my app to no avail. I use http://upload.smugmug.com and the Oauth multi-part code I use has been bullet proof for many months however I can't remember uploading to SmugMug for quite a while. Just to confirm this is the latest API, tested on multiple devices. Oauth code works for several other sites inc Photobucket. My account uploads fine via camera awesome. The original code from Apple appstore also fails now so definitely not something I've done to the code. As this issue is holding up an iOS6/iPhone 5 update for my photo app on the app store I will wait one week for any feedback then if I can't fix it will have to remove SmugMug from the app & replace it with one of the other photo sharing services. It was an easy integration to do but it's not mainstream so I will have to pull it if there's no support. Fingers crossed someone replies. update: I pointed a port sniffer at Camera Awesome. It's using an http PUT with OAuth. I have been using a multi-part http POST. Maybe analysing the working PUT data will help. Regards Ian sundialSoft Last edited by sundialsoft; Oct-07-2012 at 07:52 AM. Reason: additional info |
|
|
|
|
#2
|
|
|
Huntsville Car Scene.com
|
I hope someone chimes in. I think I've noticed a problem with the same method, but haven't had time to debug it.
__________________
Pictures and Videos of the Huntsville Car Scene: www.huntsvillecarscene.com Want faster uploading? Vote for FTP! |
|
|
|
|
#3
|
|
|
Beginner grinner
|
Looks like SMugMug support is non-existent. I will give an alternative method a try & if that does not work will have to rip it out of my app & put in something else. Will update Monday when I will get back to this.
|
|
|
|
|
#4
|
|
|
with a Heroes touch
|
Ian,
Sorry you haven't received another reply yet. While I'm no API expert, it might be helpful if you could share details, like the full request you send and what you receive back as the response.
__________________
Sebastian SmugMug Support Hero look on the bright side http://www.SebastianHosche.com |
|
|
|
|
#5
|
|
|
Beginner grinner
|
Additional info
Simon, the error coming back is as previously stated:-
code = 5; message = "system error"; method = "smugmug.images.upload"; stat = fail; My post params are:- AlbumID=22591969&Caption=Test&FileName=photoKing&P retty=true&ResponseType=JSON&SessionID=47f38ddf51f 583166b410bcb6e6bf011&Version=1.3.0&oauth_consumer _key=<MYKEYHERE>&oauth_nonce=117CB9AE-4EF0-49FD-849D-BE10E0714614&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1350994669&oauth_token=<MYTOK ENHERE>&oauth_version=1.0 The code I use (which then used separate OAUTH code to do some work) is:- NSString *aPath = @"";// because of special end point no extra path needed http://upload.smugmug.com/ AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; appDelegate.photoUploadMode = @"SMUGMUG"; NSMutableDictionary *fullParams = [[NSMutableDictionary alloc] initWithCapacity:20]; [fullParams setObject:@"photoKing" forKey:@"FileName"]; if(smugMugStep == addPhotoAfterNewAlbum) { [fullParams setObject:albumID forKey:@"AlbumID"];// id set when album create returned v } else { NSString *ID = [NSString stringWithFormat:@"%d", [[photoalbumIDs objectAtIndex:selectedIndex] intValue]]; NSLog(@"album %@",ID); [fullParams setObject:ID forKey:@"AlbumID"];// } [fullParams setObject:@"1.3.0" forKey:@"Version"]; [fullParams setObject:message forKey:@"Caption"]; [fullParams setObject:@"JSON" forKey:@"ResponseType"]; [fullParams setObject:@"true" forKey:@"Pretty"]; [fullParams setObject:self.smugMugSessionID forKey:@"SessionID"]; aRequest = [[OAuthASIFormDataRequest alloc] initWithParams llParams path:aPath];[aRequest setDelegate:self]; [aRequest setRequestMethod:@"POST"];//POST [aRequest setPostFormat: ASIMultipartFormDataPostFormat]; [aRequest setDidFinishSelector:@selector(imageUploadRequestS ucceeded:)]; [aRequest setDidFailSelector:@selector(imageUploadRequestFai led:)]; [aRequest setUploadProgressDelegate:self.sendBar]; // Upload an image [aRequest addData:media withFileName:@"photoUpload" andContentType:@"image/jpeg" forKey:@"userfile"]; [aRequest startAsynchronous]; Note that this code worked fine dozens of times & stopped working in the past few months. |
|
|
|
| Tell The World! | |
| Tags | |
| upload error , uploading | |
| Similar Threads | Thread Starter | Forum | Replies | Last Post | ![]() |
| Generate customised HTML code for galleries... | encosion | SmugMug APIs, Hacks & Tricks | 13 | Jul-22-2009 07:34 AM | |
| >>> LPS#10 Feedback thread | Shay Stephens | The Dgrin Challenges | 57 | Aug-13-2007 01:03 AM | |
| Here's the unofficial feedback thread for LPS 9--go nuts! | indiegirl | The Dgrin Challenges | 51 | Jul-27-2007 07:20 PM | |
| Odd, quarter photo fragmented pics when uploading with the Exporter for Aperture | MacLoyal | SmugMug APIs, Hacks & Tricks | 0 | Jun-10-2007 08:52 PM | |
| What the heck is going on here? | MichaelKirk | SmugMug Customization | 2 | Dec-04-2006 08:22 AM | |
| Thread Tools | |
| Display Modes | |
|
|