I need to implement a Mac OS X application. In my application I need to do two things:
You may be able to set Folder Actions to run a command on mount. This would assume that the device always mounts in the same place, i.e. /Volumes/My\ Device/ - if peripherals were added or removed in between mounts, the mount point may change. You can learn more about Folder Actions by right clicking a directory and clicking "Folder Actions Setup". The trick would be to make sure that the device always mounts in the same place.
Alternatively, you may be able to use launchd to run a command on mount. This link may help. Lingon is a great app to edit daemons.
Either way, you could use the Folder Action or daemon to call a simple script to grab the contents of the device and upload them to wherever you please.