No response from upload
danvin
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?
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?
0
Comments
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.
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"
SmugMug API Developer
My Photos