javascript fileupload and rails create after successful upload