A JavaScript API for handling picture uploads