Skip to content

Upload image to storage

Mk5 edited this page Jun 29, 2019 · 1 revision
class UploadImageExample {

    @Override
    void action() {
        GdxFIRStorage.instance()
                .upload(STORAGE_PATH, Gdx.files.internal("badlogic.jpg").readBytes())
                .after(GdxFIRAuth.instance().signInAnonymously())
                .then(new Consumer<FileMetadata>() {
                    @Override
                    public void accept(FileMetadata fileMetadata) {
                        success();
                    }
                });
    }

}
Clone this wiki locally