gcsupload

command
v0.0.0-...-e5e4ab4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

README

gcsupload

This is a simple CLI that allows you to upload a file to your Google Cloud Storage bucket.

Authentication

Please visit https://cloud.google.com/docs/authentication/getting-started

Installing it

go get -u github.com/GoogleCloudPlatform/golang-samples/storage/gcsupload

Using it

gcsupload -project orijtech-161805 -source ~/Desktop/birthdayPic.jpg -bucket orijtech-gcs-test

which will give you a result like this

URL: https://storage.googleapis.com/orijtech-gcs-test/birthdayPic.jpg
Size: 865096
MD5: 5b6c7b4aed837e8ed0f9950564a10b32

Documentation

Overview

gcsupload is a CLI to upload a file to Google Cloud Storage. Invoke -h to see its flags: gcsupload -h

 Usage of gcsupload:
   -bucket string
	    the bucket to upload content to
   -name string
	    the name of the file to be stored on GCS
   -project string
	    the ID of the GCP project to use
   -public
	    whether the item should be available publicly (default true)
   -source string
	    the path to the source

For example:

gcsupload --project gcs-samples --source ~/Desktop/birthdayPic.jpg --bucket gcs-cli-test
URL: https://storage.googleapis.com/gcs-cli-test/birthdayPic.jpg
Size: 865096
MD5: 5b6c7b4aed837e8ed0f9950564a10b32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL