Problem replacing images

nzsnappernzsnapper Registered Users Posts: 34 Big grins
I am the developer of SmuginProForAperture - an Aperture to SmugMug export plugin and I have a couple of users with problems replacing images they have uploaded to SmugMug which I am trying to track down. I don't know if anyone else has seen similar errors or has any suggestions for what might be going on.

I am using HTTP PUT to upload and replace images, when replacing the basic difference is adding the X-Smug-ImageID header field. My users are seeing two different error messages returned from SmugMug.

1) wrong format
2) gallery closed

I managed to reproduce the 'gallery closed' by replacing an image in a gallery which has been deleted and have added a fix for this case. The user says the gallery he is trying to upload to does still exist. So my first question is is there any other reason I can get this error response?

I had the 'wrong format' error message myself for about 30 minutes on Tuesday and it went away. Another user also had this error for about a day and it also went away without being able to establish the cause of the problem or why it went away and I still have another user with the same issue.

The following is some log data generated by my plugin during (successful) replace operations, the first with no change to the image and the second with the image changed (resized).

Replace existing (unchanged image)

17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] 2010/07/17 12:15:32 DEBUG -[RLSmugMugRequestMethodHelper uploadImageSynchronousRequest:replaceExisting:withArguments:error:] - Header fields : {
17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] "Content-Length" = 299179;
17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] "Content-Md5" = dec92b301f3f9d7561415aa3c27a8ad5;
17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] "Content-Type" = "image/jpeg";
17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] "User-Agent" = "SmuginPro/1.1";
17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Albumid" = 11810605;
17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Caption" = "AirforceMuseum_2010-07-12_12-18-16_DSC_4142_%C2%A9RichardLaing(2010)";
17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Filename" = "AirforceMuseum_2010-07-12_12-18-16_DSC_4142_%C2%A9RichardLaing(2010).jpeg";
17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Imageid" = 931864130;
17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Responsetype" = JSON;
17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Sessionid" = 9412a2fe7218d7dc7bef76b6b2ef2800;
17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Version" = "1.2.2";
17/07/2010 12:15:32 [0x0-0x85085].com.apple.Aperture[2714] }

17/07/2010 12:15:41 [0x0-0x85085].com.apple.Aperture[2714] 2010/07/17 12:15:41 DEBUG -[RLSmugMugRequestMethodHelper connection:didReceiveResponse:] - Received response
17/07/2010 12:15:41 [0x0-0x85085].com.apple.Aperture[2714] 2010/07/17 12:15:41 DEBUG -[RLSmugMugRequestMethodHelper connectionDidFinishLoading:] - JSON: {
17/07/2010 12:15:41 [0x0-0x85085].com.apple.Aperture[2714] Image = {
17/07/2010 12:15:41 [0x0-0x85085].com.apple.Aperture[2714] Key = xoXCA;
17/07/2010 12:15:41 [0x0-0x85085].com.apple.Aperture[2714] URL = "http://nzsnapper.smugmug.com/Other/YAT/11810605_NjuGW#931864130_xoXCA";
17/07/2010 12:15:41 [0x0-0x85085].com.apple.Aperture[2714] id = 931864130;
17/07/2010 12:15:41 [0x0-0x85085].com.apple.Aperture[2714] };
17/07/2010 12:15:41 [0x0-0x85085].com.apple.Aperture[2714] method = "smugmug.images.replace";
17/07/2010 12:15:41 [0x0-0x85085].com.apple.Aperture[2714] stat = ok;
17/07/2010 12:15:41 [0x0-0x85085].com.apple.Aperture[2714] }

Replace image (image changed)
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] 2010/07/17 12:17:26 DEBUG -[RLSmugMugRequestMethodHelper uploadImageSynchronousRequest:replaceExisting:withArguments:error:] - Header fields : {
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] "Content-Length" = 4434160;
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] "Content-Md5" = 13731721092538e9f3da8822d03f1198;
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] "Content-Type" = "image/jpeg";
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] "User-Agent" = "SmuginPro/1.1";
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Albumid" = 11810605;
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Caption" = "AirforceMuseum_2010-07-12_12-18-16_DSC_4142_%C2%A9RichardLaing(2010)";
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Filename" = "AirforceMuseum_2010-07-12_12-18-16_DSC_4142_%C2%A9RichardLaing(2010).jpeg";
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Imageid" = 931864130;
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Responsetype" = JSON;
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Sessionid" = 4fda48eb429d2e0cb3a2edff0b4154e1;
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] "X-Smug-Version" = "1.2.2";
17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] }

17/07/2010 12:18:49 [0x0-0x85085].com.apple.Aperture[2714] 2010/07/17 12:18:49 DEBUG -[RLSmugMugRequestMethodHelper connection:didReceiveResponse:] - Received response
17/07/2010 12:18:49 [0x0-0x85085].com.apple.Aperture[2714] 2010/07/17 12:18:49 DEBUG -[RLSmugMugRequestMethodHelper connectionDidFinishLoading:] - JSON: {
17/07/2010 12:18:49 [0x0-0x85085].com.apple.Aperture[2714] Image = {
17/07/2010 12:18:49 [0x0-0x85085].com.apple.Aperture[2714] Key = xoXCA;
17/07/2010 12:18:49 [0x0-0x85085].com.apple.Aperture[2714] URL = "http://nzsnapper.smugmug.com/Other/YAT/11810605_NjuGW#931864130_xoXCA";
17/07/2010 12:18:49 [0x0-0x85085].com.apple.Aperture[2714] id = 931864130;
17/07/2010 12:18:49 [0x0-0x85085].com.apple.Aperture[2714] };
17/07/2010 12:18:49 [0x0-0x85085].com.apple.Aperture[2714] method = "smugmug.images.replace";
17/07/2010 12:18:49 [0x0-0x85085].com.apple.Aperture[2714] stat = ok;
17/07/2010 12:18:49 [0x0-0x85085].com.apple.Aperture[2714] }

The request details:

17/07/2010 12:17:26 [0x0-0x85085].com.apple.Aperture[2714] 2010/07/17 12:17:26 INFO -[RLSmugMugRequestMethodHelper uploadImageSynchronousRequest:replaceExisting:withArguments:error:] - Sending request http://upload.smugmug.com/AirforceMuseum_2010-07-12_12-18-16_DSC_4142_%C2%A9RichardLaing(2010).jpeg

The image data is sent in a PUT request as the body of the request. It is sent as plain binary data not base64 encoded.

I hope someone can at least suggest somewhere to look for the problem or spot what I am doing wrong.

Thanks.
Sign In or Register to comment.