Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
bin
README.md
pubspec.yaml

README.md

Example: cloudstorage_upload_download_service_account

This example demonstrates the usage of the Google Cloud Storage API. It shows how to upload files to Cloud Storage and how to download them again.

In order to run this sample you need to replace "" in bin/main.dart with the service account credentials obtained form the Google Developers Console.

More information about how to obtain these can be found on the googleapis_auth repository.

Usage of the example:

$ dart bin/main.dart upload /usr/bin/git gs://<bucket>/usr-bin-git
$ dart bin/main.dart download gs://<bucket>/usr-bin-git usr-bin-git
$ diff /usr/bin/git usr-bin-git && echo "Files are identical"
Files are identical

Where '' needs to be replaced with a Google Cloud Storage bucket of the Cloud Project. The Developers Console can be used to create one via a web interface.

You can’t perform that action at this time.