Giter Site home page Giter Site logo

rimiti / google-gcs-examples Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 45 KB

Simple NodeJS examples to demonstrate how to use GCS.

Home Page: https://dimsolution.com

License: MIT License

JavaScript 100.00%
google google-cloud-platform google-cloud-storage gcs nodejs

google-gcs-examples's Introduction

google-gcs-examples

Simple example to demonstrate how to use Google Cloud Storage (GCS) service.

Features

  • Upload file
  • Download file
  • Remove file
  • Get file informations

Installation

$ yarn @rimiti/google-gcs-examples

How to use it?

$ import * as gcs from '@rimiti/google-gcs-examples';

// Uploading file
gcs.upload(bucket, file)
  .then(() => console.log('Upload done.')
  .catch((e) => console.error('Error during upload', e);
  
// Downloading file
gcs.download(bucket, filename, destination)
  .then(() => console.log('Download done.')
  .catch((e) => console.error('Error during download', e);
  
// Removing file
gcs.remove(bucket, filename)
  .then(() => console.log('Remove done.')
  .catch((e) => console.error('Error during remove', e);
  
// Retrieving file information
gcs.getFileInformations(bucket, filename)
  .then((informations) => console.log(informations)
  .catch((e) => console.error('Error during retrieve', e);

License

MIT © Dimitri DO BAIRRO

google-gcs-examples's People

Contributors

rimiti avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.