20 lines
		
	
	
		
			556 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			556 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import * as Minio from 'minio';
 | 
						|
import log from './log.js';
 | 
						|
import config from './config.js';
 | 
						|
 | 
						|
const minioClient = new Minio.Client({
 | 
						|
	endPoint: config.global.s3.endpoint,
 | 
						|
	port: config.global.s3.port,
 | 
						|
	useSSL: config.global.s3.use_ssl,
 | 
						|
	accessKey: config.global.s3.access_key,
 | 
						|
	secretKey: config.global.s3.secret_key
 | 
						|
});
 | 
						|
 | 
						|
export async function test() {
 | 
						|
	log.S3.debug('GET', await minioClient.presignedGetObject('atas-dev', 'test', 500));
 | 
						|
 | 
						|
	log.S3.debug('PUT', await minioClient.presignedPutObject('atas-dev', 'test', 500));
 | 
						|
}
 | 
						|
 | 
						|
export default minioClient;
 |