Parallel Uploads From Gcs With Node.js Client Libraries
Google Cloud Storage: Node.js Client
Node.js idiomatic client for Deject Storage.
Deject Storage allows world-wide storage and retrieval of any amount of data at any time. Y'all can utilise Google Deject Storage for a range of scenarios including serving website content, storing information for archival and disaster recovery, or distributing large data objects to users via direct download.
A comprehensive listing of changes in each version may be plant in the CHANGELOG.
- Google Deject Storage Node.js Client API Reference
- Google Cloud Storage Documentation
- github.com/googleapis/nodejs-storage
Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Customer Libraries Explained.
Table of contents:
- Quickstart
- Before you begin
- Installing the client library
- Using the client library
- Samples
- Versioning
- Contributing
- License
Quickstart
Earlier you begin
- Select or create a Cloud Platform project.
- Enable billing for your project.
- Enable the Google Deject Storage API.
- Set up authentication with a service business relationship and so you can access the API from your local workstation.
Installing the client library
npm install @google-cloud/storage Using the client library
// Imports the Google Deject customer library const {Storage} = crave ( '@google-cloud/storage' ) ; // For more information on ways to initialize Storage, please see // https://googleapis.dev/nodejs/storage/latest/Storage.html // Creates a customer using Awarding Default Credentials const storage = new Storage ( ) ; // Creates a client from a Google service account central // const storage = new Storage({keyFilename: 'fundamental.json'}); /** * TODO(developer): Uncomment these variables earlier running the sample. */ // The ID of your GCS bucket // const bucketName = 'your-unique-saucepan-name'; async function createBucket ( ) { // Creates the new bucket expect storage . createBucket ( bucketName ) ; console . log ( `Bucket ${ bucketName } created.` ) ; } createBucket ( ) . catch ( panel . error ) ; Samples
Samples are in the samples/ directory. Each sample'south README.dr. has instructions for running its sample.
| Sample | Source Code | Try it |
|---|---|---|
| Add Bucket Provisional Binding | source code | |
| Add Bucket Default Possessor Acl | source code | |
| Add Bucket Iam Fellow member | source code | |
| Storage Add together Bucket Label. | source code | |
| Add Bucket Owner Acl | source code | |
| Saucepan Website Configuration. | source code | |
| Add File Possessor Acl | source code | |
| Storage Become Bucket Metadata. | source code | |
| Alter Saucepan's Default Storage Class. | source code | |
| Storage File Catechumen CSEK to CMEK. | source code | |
| Storage Combine files. | source code | |
| Storage Configure Bucket Cors. | source code | |
| Configure Retries | source lawmaking | |
| Copy File | source code | |
| Copy Old Version Of File. | source code | |
| Create a Dual-Region Bucket | source code | |
| Create Bucket With Storage Class and Location. | source lawmaking | |
| Create Bucket With Turbo Replication | source code | |
| Create New Bucket | source code | |
| Create Notification | source code | |
| Delete Saucepan | source code | |
| Delete File | source code | |
| Delete Notification | source code | |
| Delete Sometime Version Of File. | source code | |
| Disable Bucket Lifecycle Management | source code | |
| Storage Disable Bucket Versioning. | source code | |
| Disable Default Event Based Hold | source code | |
| Disable Requester Pays | source lawmaking | |
| Disable Uniform Bucket Level Access | source code | |
| Download Byte Range | source lawmaking | |
| Download Encrypted File | source code | |
| Download File | source code | |
| Download File Using Requester Pays | source code | |
| Download Into Memory | source code | |
| Storage Download Public File. | source code | |
| Enable Bucket Lifecycle Direction | source code | |
| Storage Enable Saucepan Versioning. | source lawmaking | |
| Enable Default Consequence Based Hold | source code | |
| Enable Default KMS Fundamental | source code | |
| Enable Requester Pays | source code | |
| Enable Uniform Bucket Level Access | source lawmaking | |
| Change File'south Storage Class. | source code | |
| Storage Set File Metadata. | source lawmaking | |
| Generate Encryption Key | source code | |
| Generate Signed Url | source code | |
| Generate V4 Read Signed Url | source code | |
| Generate V4 Signed Policy | source code | |
| Generate V4 Upload Signed Url | source code | |
| Become Default Event Based Concord | source code | |
| Get Metadata | source code | |
| Get Metadata Notifications | source lawmaking | |
| Become Public Access Prevention | source code | |
| Get RPO | source code | |
| Get Requester Pays Condition | source code | |
| Get Retention Policy | source code | |
| Storage Get Service Business relationship. | source code | |
| Go Compatible Bucket Level Access | source code | |
| Actuate HMAC SA Key. | source lawmaking | |
| Create HMAC SA Central. | source code | |
| Conciliate HMAC SA Primal. | source code | |
| Delete HMAC SA Fundamental. | source code | |
| Go HMAC SA Fundamental Metadata. | source code | |
| List HMAC SA Keys Metadata. | source lawmaking | |
| Listing Buckets | source lawmaking | |
| Listing Files | source lawmaking | |
| List Files By Prefix | source code | |
| List Files Paginate | source code | |
| List Files with Erstwhile Versions. | source code | |
| List Notifications | source code | |
| Lock Retention Policy | source code | |
| Storage Make Bucket Public. | source code | |
| Make Public | source code | |
| Move File | source code | |
| Impress Bucket Acl | source code | |
| Print Bucket Acl For User | source code | |
| Print File Acl | source code | |
| Print File Acl For User | source lawmaking | |
| Quickstart | source code | |
| Release Issue Based Hold | source lawmaking | |
| Release Temporary Hold | source code | |
| Remove Bucket Conditional Binding | source code | |
| Storage Remove Bucket Cors Configuration. | source code | |
| Remove Bucket Default Owner | source lawmaking | |
| Remove Bucket Iam Member | source code | |
| Storage Remove Bucket Label. | source code | |
| Remove Saucepan Possessor Acl | source code | |
| Remove Default KMS Central. | source code | |
| Remove File Owner Acl | source code | |
| Remove Retention Policy | source code | |
| Rename File | source code | |
| Rotate Encryption Cardinal | source lawmaking | |
| Gear up Client Endpoint | source code | |
| Set Result Based Hold | source lawmaking | |
| Fix Public Admission Prevention Enforced | source code | |
| Set Public Access Prevention Inherited | source lawmaking | |
| Ready RPO Async Turbo | source code | |
| Set up RPO Default | source code | |
| Set Retention Policy | source lawmaking | |
| Prepare Temporary Concur | source lawmaking | |
| Stream File Download | source code | |
| Stream File Upload | source code | |
| Upload a directory to a bucket. | source code | |
| Upload Encrypted File | source code | |
| Upload File | source code | |
| Upload File With Kms Fundamental | source code | |
| Upload From Retentivity | source code | |
| Upload Without Hallmark | source code | |
| Upload Without Hallmark Signed Url | source code | |
| View Bucket Iam Members | source code | |
The Google Cloud Storage Node.js Client API Reference documentation also contains samples.
Supported Node.js Versions
Our customer libraries follow the Node.js release schedule. Libraries are uniform with all electric current active and maintenance versions of Node.js. If you are using an end-of-life version of Node.js, we recommend that you update as before long as possible to an actively supported LTS version.
Google's client libraries support legacy versions of Node.js runtimes on a all-time-efforts basis with the post-obit warnings:
- Legacy versions are non tested in continuous integration.
- Some security patches and features cannot exist backported.
- Dependencies cannot be kept upwards-to-engagement.
Client libraries targeting some end-of-life versions of Node.js are available, and can be installed through npm dist-tags. The dist-tags follow the naming convention legacy-(version). For example, npm install @google-deject/storage@legacy-8 installs client libraries for versions uniform with Node.js 8.
Versioning
This library follows Semantic Versioning.
This library is considered to be stable. The lawmaking surface will non alter in backwards-incompatible ways unless absolutely necessary (e.grand. because of critical security bug) or with an extensive deprecation period. Issues and requests confronting stable libraries are addressed with the highest priority.
More Information: Google Deject Platform Launch Stages
Contributing
Contributions welcome! See the Contributing Guide.
Please note that this README.doc, the samples/README.md, and a multifariousness of configuration files in this repository (including .nycrc and tsconfig.json) are generated from a central template. To edit one of these files, brand an edit to its templates in directory.
License
Apache Version 2.0
See LICENSE
Source: https://www.npmjs.com/package/@google-cloud/storage
0 Response to "Parallel Uploads From Gcs With Node.js Client Libraries"
Post a Comment