def upload_file(self, file_name, file_path):
upload_key = Key(bucket=self.bucket, name=file_name)<EOL>content_type = "<STR_LIT>"<EOL>if file_name.endswith("<STR_LIT>"):<EOL><INDENT>content_type = "<STR_LIT>"<EOL><DEDENT>elif file_name.endswith("<STR_LIT>"):<EOL><INDENT>content_type = "<STR_LIT>"<EOL><DEDENT>elif file_name.endswith("<STR_LIT>"):<EOL><INDENT>content_type = "<STR_LIT>"<EOL><DEDENT>upload_key.set_contents_from_filename(<EOL>file_path,<EOL>headers={"<STR_LIT:Content-Type>": content_type})<EOL>upload_key.url =upload_key.generate_url(expires_in=<NUM_LIT>).split("<STR_LIT:?>")[<NUM_LIT:0>]<EOL>try:<EOL><INDENT>upload_key.make_public()<EOL><DEDENT>except Exception:<EOL><INDENT>pass<EOL><DEDENT>
Upload a given file from the file_path to the bucket
            with the new name/path file_name.