Code 5 Issue

euplerideuplerid Posts: 1Registered Users Beginner grinner
Hi wonderful folks!

I'm getting "code 5" responses from SmugMug when I try to upload photos. The full ImageUploadResponse looks like this:
{stat=fail, method=smugmug.images.upload, image=null, code=5, message=system error}

The headers look like this:
{Authorization=oauth_nonce="$NONCE",oauth_signature="$SIGNATURE",oauth_token="$TOKEN",oauth_consumer_key="$KEY",oauth_timestamp="1533759656",oauth_signature_method="HMAC-SHA1",oauth_version="1.0", X-Smug-ResponseType=JSON, X-Smug-AlbumUri=/api/v2/album/MkVZht, Accept=application/json, X-Smug-Version=v2, User-Agent=Portability, Content-Length=75047, X-Smug-Caption=Untitled, Content-Type=image/jpeg, Content-MD5=4qvn...Kw==}

I get the AlbumUri for the X-Smug-AlbumUri header directly from the AlbumResponse when I create an album, not from the album contained in the response. Since there's no "n-" at the beginning, I'm pretty sure it's not a Node URI as I saw in other threads.

This is how I come up with the MD5 signature:
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] digest = md.digest(contentBytes);
String signature = BaseEncoding.base64().encode(digest);
headersMap.put("Content-MD5", signature);

Anything look wrong to anyone?
Sign In or Register to comment.