{"id":13554818,"url":"https://github.com/minio/minio-js","last_synced_at":"2026-02-28T01:49:32.276Z","repository":{"id":32470848,"uuid":"36050777","full_name":"minio/minio-js","owner":"minio","description":"MinIO Client SDK for Javascript","archived":false,"fork":false,"pushed_at":"2025-04-30T16:26:27.000Z","size":2621,"stargazers_count":1035,"open_issues_count":33,"forks_count":292,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-05-06T15:21:15.423Z","etag":null,"topics":["aws-s3","javascript","javascript-library","minio-client","storage-servers"],"latest_commit_sha":null,"homepage":"https://docs.min.io/docs/javascript-client-quickstart-guide.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-05-22T03:42:19.000Z","updated_at":"2025-05-04T09:04:43.000Z","dependencies_parsed_at":"2023-09-23T04:10:37.613Z","dependency_job_id":"d2c8a63f-af5c-4956-9290-22ea315f73cd","html_url":"https://github.com/minio/minio-js","commit_stats":{"total_commits":733,"total_committers":77,"mean_commits":9.519480519480519,"dds":0.6821282401091405,"last_synced_commit":"82b0659456cdd3eab5c4fab99eed449845a0c8e3"},"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minio%2Fminio-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minio%2Fminio-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minio%2Fminio-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minio%2Fminio-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minio","download_url":"https://codeload.github.com/minio/minio-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076849,"owners_count":22010611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-s3","javascript","javascript-library","minio-client","storage-servers"],"created_at":"2024-08-01T12:02:55.478Z","updated_at":"2026-02-28T01:49:32.268Z","avatar_url":"https://github.com/minio.png","language":"JavaScript","readme":"# MinIO JavaScript Library for Amazon S3 Compatible Cloud Storage [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io)\n\n[![NPM](https://nodei.co/npm/minio.png)](https://nodei.co/npm/minio/)\n\nThe MinIO JavaScript Client SDK provides high level APIs to access any Amazon S3 compatible object storage server.\n\nThis guide will show you how to install the client SDK and execute an example JavaScript program.\nFor a complete list of APIs and examples, please take a look at the [JavaScript Client API Reference](https://docs.min.io/enterprise/aistor-object-store/developers/sdk/javascript/api/) documentation.\n\nThis document presumes you have a working [Node.js](http://nodejs.org/) development environment, LTS versions v16, v18 or v20.\n\n## Download from NPM\n\n```sh\nnpm install --save minio\n```\n\n## Download from Source\n\n```sh\ngit clone https://github.com/minio/minio-js\ncd minio-js\nnpm install\nnpm run build\nnpm install -g\n```\n\n## Using with TypeScript\n\n`minio\u003e7.1.0` is shipped with builtin type definition, `@types/minio` is no longer needed.\n\n## Initialize MinIO Client\n\nThe following parameters are needed to connect to a MinIO object storage server:\n\n| Parameter   | Description                                                                  |\n| :---------- | :--------------------------------------------------------------------------- |\n| `endPoint`  | Hostname of the object storage service.                                      |\n| `port`      | TCP/IP port number. Optional, defaults to `80` for HTTP and `443` for HTTPs. |\n| `accessKey` | Access key (user ID) of an account in the S3 service.                        |\n| `secretKey` | Secret key (password) of an account in the S3 service.                       |\n| `useSSL`    | Optional, set to 'true' to enable secure (HTTPS) access.                     |\n\n```js\nimport * as Minio from 'minio'\n\nconst minioClient = new Minio.Client({\n  endPoint: 'play.min.io',\n  port: 9000,\n  useSSL: true,\n  accessKey: 'Q3AM3UQ867SPQQA43P2F',\n  secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',\n})\n```\n\n## Quick Start Example - File Uploader\n\nThis example connects to an object storage server, creates a bucket, and uploads a file to the bucket.\nIt uses the MinIO `play` server, a public MinIO cluster located at [https://play.min.io](https://play.min.io).\n\nThe `play` server runs the latest stable version of MinIO and may be used for testing and development.\nThe access credentials shown in this example are open to the public.\nAll data uploaded to `play` should be considered public and non-protected.\n\n#### file-uploader.mjs\n\n```js\nimport * as Minio from 'minio'\n\n// Instantiate the MinIO client with the object store service\n// endpoint and an authorized user's credentials\n// play.min.io is the MinIO public test cluster\nconst minioClient = new Minio.Client({\n  endPoint: 'play.min.io',\n  port: 9000,\n  useSSL: true,\n  accessKey: 'Q3AM3UQ867SPQQA43P2F',\n  secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',\n})\n\n// File to upload\nconst sourceFile = '/tmp/test-file.txt'\n\n// Destination bucket\nconst bucket = 'js-test-bucket'\n\n// Destination object name\nconst destinationObject = 'my-test-file.txt'\n\n// Check if the bucket exists\n// If it doesn't, create it\nconst exists = await minioClient.bucketExists(bucket)\nif (exists) {\n  console.log('Bucket ' + bucket + ' exists.')\n} else {\n  await minioClient.makeBucket(bucket, 'us-east-1')\n  console.log('Bucket ' + bucket + ' created in \"us-east-1\".')\n}\n\n// Set the object metadata\nvar metaData = {\n  'Content-Type': 'text/plain',\n  'X-Amz-Meta-Testing': 1234,\n  example: 5678,\n}\n\n// Upload the file with fPutObject\n// If an object with the same name exists,\n// it is updated with new data\nawait minioClient.fPutObject(bucket, destinationObject, sourceFile, metaData)\nconsole.log('File ' + sourceFile + ' uploaded as object ' + destinationObject + ' in bucket ' + bucket)\n```\n\n#### Run the File Uploader\n\n```sh\nnode file-uploader.mjs\nBucket js-test-bucket created successfully in \"us-east-1\".\nFile /tmp/test-file.txt uploaded successfully as my-test-file.txt to bucket js-test-bucket\n```\n\nVerify the object was created with [`mc`](https://min.io/docs/minio/linux/reference/minio-mc.html):\n\n```\nmc ls play/js-test-bucket\n[2023-11-10 17:52:20 UTC]  20KiB STANDARD my-test-file.txt\n```\n\n## API Reference\n\nThe complete API Reference is available here:\n\n- [MinIO JavaScript API Reference](https://min.io/docs/minio/linux/developers/javascript/API.html)\n\n### Bucket Operations\n\n- [`makeBucket`](https://min.io/docs/minio/linux/developers/javascript/API.html#makeBucket)\n- [`listBuckets`](https://min.io/docs/minio/linux/developers/javascript/API.html#listBuckets)\n- [`bucketExists`](https://min.io/docs/minio/linux/developers/javascript/API.html#bucketExists)\n- [`removeBucket`](https://min.io/docs/minio/linux/developers/javascript/API.html#removeBucket)\n- [`listObjects`](https://min.io/docs/minio/linux/developers/javascript/API.html#listObjects)\n- [`listObjectsV2`](https://min.io/docs/minio/linux/developers/javascript/API.html#listObjectsV2)\n- [`listObjectsV2WithMetadata`](https://min.io/docs/minio/linux/developers/javascript/API.html#listObjectsV2WithMetadata) (Extension)\n- [`listIncompleteUploads`](https://min.io/docs/minio/linux/developers/javascript/API.html#listIncompleteUploads)\n- [`getBucketVersioning`](https://min.io/docs/minio/linux/developers/javascript/API.html#getBucketVersioning)\n- [`setBucketVersioning`](https://min.io/docs/minio/linux/developers/javascript/API.html#setBucketVersioning)\n- [`setBucketLifecycle`](https://min.io/docs/minio/linux/developers/javascript/API.html#setBucketLifecycle)\n- [`getBucketLifecycle`](https://min.io/docs/minio/linux/developers/javascript/API.html#getBucketLifecycle)\n- [`removeBucketLifecycle`](https://min.io/docs/minio/linux/developers/javascript/API.html#removeBucketLifecycle)\n- [`getObjectLockConfig`](https://min.io/docs/minio/linux/developers/javascript/API.html#getObjectLockConfig)\n- [`setObjectLockConfig`](https://min.io/docs/minio/linux/developers/javascript/API.html#setObjectLockConfig)\n\n### File Object Operations\n\n- [`fPutObject`](https://min.io/docs/minio/linux/developers/javascript/API.html#fPutObject)\n- [`fGetObject`](https://min.io/docs/minio/linux/developers/javascript/API.html#fGetObject)\n\n### Object Operations\n\n- [`getObject`](https://min.io/docs/minio/linux/developers/javascript/API.html#getObject)\n- [`putObject`](https://min.io/docs/minio/linux/developers/javascript/API.html#putObject)\n- [`copyObject`](https://min.io/docs/minio/linux/developers/javascript/API.html#copyObject)\n- [`statObject`](https://min.io/docs/minio/linux/developers/javascript/API.html#statObject)\n- [`removeObject`](https://min.io/docs/minio/linux/developers/javascript/API.html#removeObject)\n- [`removeObjects`](https://min.io/docs/minio/linux/developers/javascript/API.html#removeObjects)\n- [`removeIncompleteUpload`](https://min.io/docs/minio/linux/developers/javascript/API.html#removeIncompleteUpload)\n- [`selectObjectContent`](https://min.io/docs/minio/linux/developers/javascript/API.html#selectObjectContent)\n\n### Presigned Operations\n\n- [`presignedUrl`](https://min.io/docs/minio/linux/developers/javascript/API.html#presignedUrl)\n- [`presignedGetObject`](https://min.io/docs/minio/linux/developers/javascript/API.html#presignedGetObject)\n- [`presignedPutObject`](https://min.io/docs/minio/linux/developers/javascript/API.html#presignedPutObject)\n- [`presignedPostPolicy`](https://min.io/docs/minio/linux/developers/javascript/API.html#presignedPostPolicy)\n\n### Bucket Notification Operations\n\n- [`getBucketNotification`](https://min.io/docs/minio/linux/developers/javascript/API.html#getBucketNotification)\n- [`setBucketNotification`](https://min.io/docs/minio/linux/developers/javascript/API.html#setBucketNotification)\n- [`removeAllBucketNotification`](https://min.io/docs/minio/linux/developers/javascript/API.html#removeAllBucketNotification)\n- [`listenBucketNotification`](https://min.io/docs/minio/linux/developers/javascript/API.html#listenBucketNotification) (MinIO Extension)\n\n### Bucket Policy Operations\n\n- [`getBucketPolicy`](https://min.io/docs/minio/linux/developers/javascript/API.html#getBucketPolicy)\n- [`setBucketPolicy`](https://min.io/docs/minio/linux/developers/javascript/API.html#setBucketPolicy)\n\n## Examples\n\n#### Bucket Operations\n\n- [list-buckets.mjs](https://github.com/minio/minio-js/blob/master/examples/list-buckets.mjs)\n- [list-objects.js](https://github.com/minio/minio-js/blob/master/examples/list-objects.js)\n- [list-objects-v2.js](https://github.com/minio/minio-js/blob/master/examples/list-objects-v2.js)\n- [list-objects-v2-with-metadata.js](https://github.com/minio/minio-js/blob/master/examples/list-objects-v2-with-metadata.js) (Extension)\n- [bucket-exists.mjs](https://github.com/minio/minio-js/blob/master/examples/bucket-exists.mjs)\n- [make-bucket.mjs](https://github.com/minio/minio-js/blob/master/examples/make-bucket.mjs)\n- [remove-bucket.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-bucket.mjs)\n- [list-incomplete-uploads.js](https://github.com/minio/minio-js/blob/master/examples/list-incomplete-uploads.js)\n- [get-bucket-versioning.mjs](https://github.com/minio/minio-js/blob/master/examples/get-bucket-versioning.mjs)\n- [set-bucket-versioning.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-versioning.mjs)\n- [set-bucket-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-tagging.mjs)\n- [get-bucket-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/get-bucket-tagging.mjs)\n- [remove-bucket-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-bucket-tagging.mjs)\n- [set-bucket-lifecycle.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-lifecycle.mjs)\n- [get-bucket-lifecycle.mjs](https://github.com/minio/minio-js/blob/master/examples/get-bucket-lifecycle.mjs)\n- [remove-bucket-lifecycle.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-bucket-lifecycle.mjs)\n- [get-object-lock-config.mjs](https://github.com/minio/minio-js/blob/master/examples/get-object-lock-config.mjs)\n- [set-object-lock-config.mjs](https://github.com/minio/minio-js/blob/master/examples/set-object-lock-config.mjs)\n- [set-bucket-replication.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-replication.mjs)\n- [get-bucket-replication.mjs](https://github.com/minio/minio-js/blob/master/examples/get-bucket-replication.mjs)\n- [remove-bucket-replication.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-bucket-replication.mjs)\n- [set-bucket-encryption.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-encryption.mjs)\n- [get-bucket-encryption.mjs](https://github.com/minio/minio-js/blob/master/examples/get-bucket-encryption.mjs)\n- [remove-bucket-encryption.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-bucket-encryption.mjs)\n\n#### File Object Operations\n\n- [fput-object.mjs](https://github.com/minio/minio-js/blob/master/examples/fput-object.mjs)\n- [fget-object.mjs](https://github.com/minio/minio-js/blob/master/examples/fget-object.mjs)\n\n#### Object Operations\n\n- [put-object.mjs](https://github.com/minio/minio-js/blob/master/examples/put-object.mjs)\n- [get-object.mjs](https://github.com/minio/minio-js/blob/master/examples/get-object.mjs)\n- [copy-object.mjs](https://github.com/minio/minio-js/blob/master/examples/copy-object.mjs)\n- [get-partialobject.mjs](https://github.com/minio/minio-js/blob/master/examples/get-partialobject.mjs)\n- [remove-object.js](https://github.com/minio/minio-js/blob/master/examples/remove-object.js)\n- [remove-incomplete-upload.js](https://github.com/minio/minio-js/blob/master/examples/remove-incomplete-upload.js)\n- [stat-object.mjs](https://github.com/minio/minio-js/blob/master/examples/stat-object.mjs)\n- [get-object-retention.mjs](https://github.com/minio/minio-js/blob/master/examples/get-object-retention.mjs)\n- [put-object-retention.mjs](https://github.com/minio/minio-js/blob/master/examples/put-object-retention.mjs)\n- [set-object-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/set-object-tagging.mjs)\n- [get-object-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/get-object-tagging.mjs)\n- [remove-object-tagging.mjs](https://github.com/minio/minio-js/blob/master/examples/remove-object-tagging.mjs)\n- [set-object-legal-hold.mjs](https://github.com/minio/minio-js/blob/master/examples/set-object-legal-hold.mjs)\n- [get-object-legal-hold.mjs](https://github.com/minio/minio-js/blob/master/examples/get-object-legal-hold.mjs)\n- [compose-object.mjs](https://github.com/minio/minio-js/blob/master/examples/compose-object.mjs)\n- [select-object-content.mjs](https://github.com/minio/minio-js/blob/master/examples/select-object-content.mjs)\n\n#### Presigned Operations\n\n- [presigned-getobject.mjs](https://github.com/minio/minio-js/blob/master/examples/presigned-getobject.mjs)\n- [presigned-putobject.mjs](https://github.com/minio/minio-js/blob/master/examples/presigned-putobject.mjs)\n- [presigned-postpolicy.mjs](https://github.com/minio/minio-js/blob/master/examples/presigned-postpolicy.mjs)\n\n#### Bucket Notification Operations\n\n- [get-bucket-notification.js](https://github.com/minio/minio-js/blob/master/examples/get-bucket-notification.js)\n- [set-bucket-notification.js](https://github.com/minio/minio-js/blob/master/examples/set-bucket-notification.js)\n- [remove-all-bucket-notification.js](https://github.com/minio/minio-js/blob/master/examples/remove-all-bucket-notification.js)\n- [listen-bucket-notification.js](https://github.com/minio/minio-js/blob/master/examples/minio/listen-bucket-notification.js) (MinIO Extension)\n\n#### Bucket Policy Operations\n\n- [get-bucket-policy.js](https://github.com/minio/minio-js/blob/master/examples/get-bucket-policy.js)\n- [set-bucket-policy.mjs](https://github.com/minio/minio-js/blob/master/examples/set-bucket-policy.mjs)\n\n## Custom Settings\n\n- [setAccelerateEndPoint](https://github.com/minio/minio-js/blob/master/examples/set-accelerate-end-point.js)\n\n## Explore Further\n\n- [Complete Documentation](https://min.io/docs/minio/kubernetes/upstream/index.html)\n- [MinIO JavaScript Client SDK API Reference](https://min.io/docs/minio/linux/developers/javascript/API.html)\n\n## Contribute\n\n- [Contributors Guide](https://github.com/minio/minio-js/blob/master/CONTRIBUTING.md)\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/minio/minio-js/nodejs.yml)\n","funding_links":[],"categories":["JavaScript","javascript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminio%2Fminio-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminio%2Fminio-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminio%2Fminio-js/lists"}