js handler for upload complete