Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Upload file to Google Cloud Storage using GOLANG

This example will help you to upload files & create a folder structure in google cloud storage

Installation

Use the package manager dep to install dependencies for this project.

You can refer here to create service account key for GCP storage

Usage

cd src/gcp-storage-service
go run main.go

Output :

Upload files to GCP storage in standard (regional) bucket
2019/03/16 23:38:28 URL: https://storage.googleapis.com/smart-bucket1/2019March16/testlogo.png
2019/03/16 23:38:28 Size: 696279
2019/03/16 23:38:28 MD5: 53053354e7d0307abb9e2f9d039b59b2

notes

  1. Make sure that .env file parameters are filled up correctly.
  2. Make sure you have correct $GOPATH, refer here how to set it.

About

Upload files to GCP storage using golang

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages