How to do HTTPS upload?

bluecookiemonsterbluecookiemonster Registered Users Posts: 6 Big grins
Hi,

I've been working on some code (in C) for uploading and got most of the prototype working happily. I can get list of albums and upload images to an album of choice. I use OAUTH and v1.3.0 of the API. It works on both http and https with one exception. The uploads don't work on HTTPS. It appears the server upload.smugmug.com don't allow connections to the HTTPS port (443).

Is upload.smugmug.com supposed to work over HTTPS? If not, is there another way to securely upload images to smugmug?

Cheers!
/P

Reference http://api.smugmug.com/services/api/?method=upload

Comments

  • ktvoelkerktvoelker Registered Users Posts: 25 Big grins
    edited August 27, 2014
    Could you please tell us:
    • Which upload method you are using
    • What headers or parameters you are sending with the upload (don't include your API key!)
    • Details about the error - do you get an HTTP response or does the connection close prematurely? If you get a response, what does it say?
    Thanks!
    Karl Voelker
    Sorcerer and API Guy at SmugMug
  • bluecookiemonsterbluecookiemonster Registered Users Posts: 6 Big grins
    edited August 27, 2014
    ktvoelker wrote: »
    Could you please tell us:
    • Which upload method you are using
    • What headers or parameters you are sending with the upload (don't include your API key!)
    • Details about the error - do you get an HTTP response or does the connection close prematurely? If you get a response, what does it say?
    Thanks!

    Hi,

    Thanks for your response. I use the HTTP PUT method described on that link. Below is an example HTTP header (using non-secure HTTP). The problem I'm experiencing is a timeout connecting to https://upload.smugmug.com.

    However, it doesn't matter what upload method I use as the server resets connection attempts to the HTTPS port (443). Check in Wireshark for yourself: https://upload.smugmug.com, only TCP RST coming back. So there's no TCP connection established and thus never any HTTP exchanged.

    Cheers!
    /P

    Example HTTP headers, I've replaced information in Authorization and X-Smug-AlbumID with bogus data:
    PUT /dsc_2169_crop.jpg HTTP/1.1
    User-Agent: BlackMug/0.9
    Host: upload.smugmug.com
    Accept: */*
    Authorization: OAuth realm="http://api.smugmug.com", oauth_consumer_key="xxx", oauth_nonce="random", oauth_signature_method="HMAC-SHA1", oauth_timestamp="stamp", oauth_token="token", oauth_version="1.0", oauth_signature="signature"
    X-Smug-AlbumID: <number>
    X-Smug-Version: 1.3.0
    Content-Type: image/jpeg
    Content-MD5: vQIqByWUz4hYDakr+OITgQ==
    X-Smug-Caption: This is a test caption
    X-Smug-Keywords: keyword, test, BlackMug
    X-Smug-Title: TestTitle
    X-Smug-ResponseType: JSON
    Content-Length: 482190
    Expect: 100-continue
    
  • ktvoelkerktvoelker Registered Users Posts: 25 Big grins
    edited August 28, 2014
    I talked with some other sorcerers and found out that uploading over SSL is unfortunately not supported right now. I will see about changing that.
    Karl Voelker
    Sorcerer and API Guy at SmugMug
  • bluecookiemonsterbluecookiemonster Registered Users Posts: 6 Big grins
    edited August 29, 2014
    ktvoelker wrote: »
    I talked with some other sorcerers and found out that uploading over SSL is unfortunately not supported right now. I will see about changing that.

    Thanks,

    I see, that certainly explains it. I hope it's added and appreciate that you try push for it. I believe smugmug customers pay because we get exceptional service and SSL uploading protects our intellectual property and privacy, and gives us peace of mind that I think a paying customer deserves.

    Thanks very much!
    /P
Sign In or Register to comment.