<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def upload_file_to_bucket(self, bucket, file_path, key, is_public=False):
 """ Upload files to S3 Bucket """


        with open(file_path, 'rb') as data:
            self.__s3.upload_fileobj(data, bucket, key)

        if is_public:
            self.__s3.put_object_acl(ACL='public-read', Bucket=bucket, Key=key)

        bucket_location = self.__s3.get_bucket_location(Bucket=bucket)
        file_url = "https://s3-{0}.amazonaws.com/{1}/{2}".format(
            bucket_location['LocationConstraint'],
            bucket,
            key)

        return file_url