Gathering detailed insights and metrics for minio
Gathering detailed insights and metrics for minio
Gathering detailed insights and metrics for minio
Gathering detailed insights and metrics for minio
npm install minio
Typescript
Module System
Min. Node Version
Node Version
NPM Version
62.9
Supply Chain
98.2
Quality
89.6
Maintenance
100
Vulnerability
99.3
License
JavaScript (55.15%)
TypeScript (44.84%)
Shell (0.02%)
Total Downloads
26,663,592
Last Day
29,268
Last Week
208,593
Last Month
926,595
Last Year
9,561,489
974 Stars
1,219 Commits
285 Forks
22 Watching
4 Branches
106 Contributors
Latest Version
8.0.3
Package Id
minio@8.0.3
Unpacked Size
2.02 MB
Size
531.68 kB
File Count
123
NPM Version
10.8.2
Node Version
20.18.1
Publised On
18 Dec 2024
Cumulative downloads
Total Downloads
Last day
-25.2%
29,268
Compared to previous day
Last week
-7.2%
208,593
Compared to previous week
Last month
-4.6%
926,595
Compared to previous month
Last year
43%
9,561,489
Compared to previous year
14
42
The MinIO JavaScript Client SDK provides high level APIs to access any Amazon S3 compatible object storage server.
This guide will show you how to install the client SDK and execute an example JavaScript program. For a complete list of APIs and examples, please take a look at the JavaScript Client API Reference documentation.
This document presumes you have a working Node.js development environment, LTS versions v16, v18 or v20.
1npm install --save minio
1git clone https://github.com/minio/minio-js 2cd minio-js 3npm install 4npm run build 5npm install -g
minio>7.1.0
is shipped with builtin type definition, @types/minio
is no longer needed.
The following parameters are needed to connect to a MinIO object storage server:
Parameter | Description |
---|---|
endPoint | Hostname of the object storage service. |
port | TCP/IP port number. Optional, defaults to 80 for HTTP and 443 for HTTPs. |
accessKey | Access key (user ID) of an account in the S3 service. |
secretKey | Secret key (password) of an account in the S3 service. |
useSSL | Optional, set to 'true' to enable secure (HTTPS) access. |
1import * as Minio from 'minio'
2
3const minioClient = new Minio.Client({
4 endPoint: 'play.min.io',
5 port: 9000,
6 useSSL: true,
7 accessKey: 'Q3AM3UQ867SPQQA43P2F',
8 secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',
9})
This example connects to an object storage server, creates a bucket, and uploads a file to the bucket.
It uses the MinIO play
server, a public MinIO cluster located at https://play.min.io.
The play
server runs the latest stable version of MinIO and may be used for testing and development.
The access credentials shown in this example are open to the public.
All data uploaded to play
should be considered public and non-protected.
1import * as Minio from 'minio' 2 3// Instantiate the MinIO client with the object store service 4// endpoint and an authorized user's credentials 5// play.min.io is the MinIO public test cluster 6const minioClient = new Minio.Client({ 7 endPoint: 'play.min.io', 8 port: 9000, 9 useSSL: true, 10 accessKey: 'Q3AM3UQ867SPQQA43P2F', 11 secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG', 12}) 13 14// File to upload 15const sourceFile = '/tmp/test-file.txt' 16 17// Destination bucket 18const bucket = 'js-test-bucket' 19 20// Destination object name 21const destinationObject = 'my-test-file.txt' 22 23// Check if the bucket exists 24// If it doesn't, create it 25const exists = await minioClient.bucketExists(bucket) 26if (exists) { 27 console.log('Bucket ' + bucket + ' exists.') 28} else { 29 await minioClient.makeBucket(bucket, 'us-east-1') 30 console.log('Bucket ' + bucket + ' created in "us-east-1".') 31} 32 33// Set the object metadata 34var metaData = { 35 'Content-Type': 'text/plain', 36 'X-Amz-Meta-Testing': 1234, 37 example: 5678, 38} 39 40// Upload the file with fPutObject 41// If an object with the same name exists, 42// it is updated with new data 43await minioClient.fPutObject(bucket, destinationObject, sourceFile, metaData) 44console.log('File ' + sourceFile + ' uploaded as object ' + destinationObject + ' in bucket ' + bucket)
1node file-uploader.mjs 2Bucket js-test-bucket created successfully in "us-east-1". 3File /tmp/test-file.txt uploaded successfully as my-test-file.txt to bucket js-test-bucket
Verify the object was created with mc
:
mc ls play/js-test-bucket
[2023-11-10 17:52:20 UTC] 20KiB STANDARD my-test-file.txt
The complete API Reference is available here:
makeBucket
listBuckets
bucketExists
removeBucket
listObjects
listObjectsV2
listObjectsV2WithMetadata
(Extension)listIncompleteUploads
getBucketVersioning
setBucketVersioning
setBucketLifecycle
getBucketLifecycle
removeBucketLifecycle
getObjectLockConfig
setObjectLockConfig
getObject
putObject
copyObject
statObject
removeObject
removeObjects
removeIncompleteUpload
selectObjectContent
getBucketNotification
setBucketNotification
removeAllBucketNotification
listenBucketNotification
(MinIO Extension)No vulnerabilities found.
Reason
14 commit(s) and 14 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
Found 25/28 approved changesets -- score normalized to 8
Reason
3 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Score
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More