@Override
    public InputStream fetch(String fetchKey, Metadata metadata, ParseContext parseContext) throws TikaException, IOException {

        LOGGER.debug("about to fetch fetchkey={} from bucket ({})", fetchKey, bucket);

        try {
            Blob blob = storage.get(BlobId.of(bucket, fetchKey));

            if (extractUserMetadata) {
                if (blob.getMetadata() != null) {
                    for (Map.Entry<String, String> e : blob.getMetadata().entrySet()) {
                        metadata.add(PREFIX + ":" + e.getKey(), e.getValue());
                    }
                }
            }
            if (!spoolToTemp) {
                return TikaInputStream.get(blob.getContent());
            } else {
                long start = System.currentTimeMillis();
                TemporaryResources tmpResources = new TemporaryResources();
                Path tmp = tmpResources.createTempFile();
                blob.downloadTo(tmp);
                TikaInputStream tis = TikaInputStream.get(tmp, metadata, tmpResources);
                long elapsed = System.currentTimeMillis() - start;
                LOGGER.debug("took {} ms to copy to local tmp file", elapsed);
                return tis;
            }
        } catch (Exception e) {
            throw new IOException("gcs storage exception", e);
        }
    }
Fetches files from google cloud storage. Must set projectId and bucket via the config.
tika-pipes/tika-fetchers/tika-fetcher-gcs/src/main/java/org/apache/tika/pipes/fetcher/gcs/GCSFetcher.java