Install the folder action on automator, open the shell script and paste your api key over "YOUR_KEY". You really would not want to keep the action to the desktop, so read this http://osxdaily.com/2011/01/26/change-the-screenshot-save-file-location-in-mac-os-x/
You can get your api key here: https://imgur.com/register/api_anon You can also request a api key for your gallery, just look it up (you have to use OAuth for that).
Enjoy! :)