use javascript to upload file from another server and get URL to input form automatically