Skip to content

Commit

Permalink
Switch to new upload endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kennett committed Mar 11, 2012
1 parent 069df3a commit 16bdd38
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions 500px Aperture Uploader/FiveHundredPxOAuthEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ @implementation FiveHundredPxOAuthEngine

// Default hostname and paths
static NSString * const k500pxHostname = @"api.500px.com";
static NSString * const k500pxUploadHostname = @"upload.500px.com";
static NSString * const k500pxGetAccessTokenPath = @"v1/oauth/access_token";
static NSString * const k500pxGetRequestTokenPath = @"v1/oauth/request_token";
static NSString * const k500pxGetPhotosPath = @"v1/photos";
static NSString * const k500pxGetUserDetailsPath = @"v1/users";
static NSString * const k500pxPostPhotoPath = @"v1/photos";
static NSString * const k500pxUploadPhotoPath = @"v1/upload";
static NSString * const k500pxUploadPhotoPath = @"api/v1/upload";

#pragma mark - Initialization

Expand All @@ -55,7 +56,7 @@ - (id)initWithDelegate:(id <FiveHundredPxEngineDelegate>)del

if (self) {
self.delegate = del;
self.fileUploadEngine = [[MKNetworkEngine alloc] initWithHostName:k500pxHostname
self.fileUploadEngine = [[MKNetworkEngine alloc] initWithHostName:k500pxUploadHostname
customHeaderFields:nil];

// Retrieve OAuth access token (if previously stored)
Expand Down Expand Up @@ -343,7 +344,7 @@ -(void)uploadPhoto:(NSData *)jpgData withMetaData:(NSDictionary *)metaData uploa
MKNetworkOperation *op = [self.fileUploadEngine operationWithPath:k500pxUploadPhotoPath
params:postParams
httpMethod:@"POST"
ssl:YES];
ssl:NO];
[op addData:jpgData
forKey:@"file"];

Expand Down

0 comments on commit 16bdd38

Please sign in to comment.