All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.getstream.cloud.CloudFileStorageClient Maven / Gradle / Ivy

There is a newer version: 3.15.1
Show newest version
package io.getstream.cloud;

import io.getstream.core.StreamFiles;
import io.getstream.core.exceptions.StreamException;
import io.getstream.core.http.Token;
import java.io.File;
import java.net.URL;
import java8.util.concurrent.CompletableFuture;

public final class CloudFileStorageClient {
  private final Token token;
  private final StreamFiles files;

  CloudFileStorageClient(Token token, StreamFiles files) {
    this.token = token;
    this.files = files;
  }

  public CompletableFuture upload(String fileName, byte[] content) throws StreamException {
    return files.upload(token, fileName, content);
  }

  public CompletableFuture upload(File content) throws StreamException {
    return files.upload(token, content);
  }

  public CompletableFuture delete(URL url) throws StreamException {
    return files.delete(token, url);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy