def METHOD_NAME(self, file_obj, mode="wb", ext=None, key: Optional[str] = None) -> PublicGCSFileHandle:
    """
    Reworked from dagster_gcp.gcs.file_manager.GCSFileManager.write
    As the original method does not allow to set the content type of the file
    """
    key = check.opt_str_param(key, "key", default=str(uuid.uuid4()))
    check_file_like_obj(file_obj)
    gcs_key = self.get_full_key(key + (("." + ext) if ext is not None else ""))
    bucket_obj = self._client.bucket(self._gcs_bucket)
    blob = bucket_obj.blob(gcs_key)
    # Set Cache-Control header to no-cache to avoid caching issues
    # This is IMPORTANT because if we don't set this header, the metadata file will be cached by GCS
    # and the next time we try to download it, we will get the stale version
    blob.cache_control = "no-cache"
    blob.content_type = self.get_content_type(ext)
    blob.upload_from_file(file_obj)
    return PublicGCSFileHandle(self._gcs_bucket, gcs_key)