setup js for upload