Options

No response from upload

danvindanvin Registered Users Posts: 1 Beginner grinner
Hey all,

I'm trying to write a script that will upload an image using curl.

curl --data-binary @*path to file* -A "SmugAutomator/${APP_VERSION}" -H "Content-Length: ${MUG_SIZE}" -H "Content-MD5: ${MUG_MD5}" -H "X-Smug-SessionID: ${MUG_SESSION}" -H "X-Smug-Version: ${MUG_API_VERSION}" -H "X-Smug-ResponseType: REST" -H "X-Smug-AlbumID: ${MUG_ALBUMID}" -H "X-Smug-FileName: ${SS_TMP_FILE}.png" -H "X-Smug-Caption: Screenshot" -s -k -o /tmp/smug_screenshot-upload.xml "http://upload.smugmug.com/photos/xmlrawadd.mg"

However, I'm getting a blank response back from the server:
<?xml version="1.0" encoding="utf-8"?>

Any idea what I may be doing wrong?

Comments

  • Options
    kevinikevini Registered Users Posts: 16 Big grins
    edited February 13, 2012
    Odd, I'm having the exact same issue. Seems not everyone is having it - did you work through yours by now?

    Update: found out I messed up a param in my request. The upload log is useful, wish the error posted there was returned - I wasn't looking there initially.
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited February 14, 2012
    Using PUT should resolve this...

    curl --data-binary @*path to file* -X PUT -A "SmugAutomator/${APP_VERSION}" -H "Content-Length: ${MUG_SIZE}" -H "Content-MD5: ${MUG_MD5}" -H "X-Smug-SessionID: ${MUG_SESSION}" -H "X-Smug-Version: ${MUG_API_VERSION}" -H "X-Smug-ResponseType: REST" -H "X-Smug-AlbumID: ${MUG_ALBUMID}" -H "X-Smug-FileName: ${SS_TMP_FILE}.png" -H "X-Smug-Caption: Screenshot" -s -k -o /tmp/smug_screenshot-upload.xml "http://upload.smugmug.com/${SS_TMP_FILE}.png&quot;
    David Parry
    SmugMug API Developer
    My Photos
Sign In or Register to comment.