File tree Expand file tree Collapse file tree 3 files changed +61
-0
lines changed
src/backend/storage/integrations Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,15 @@ import type { IStorageIntegrationsImplemention } from "../types";
22import { AWS_STORAGE_INTEGRATION } from "./aws" ;
33import { CLOUDINARY_STORAGE_INTEGRATION } from "./cloudinary" ;
44import { GOOGLE_STORAGE_INTEGRATION } from "./google" ;
5+ import { MINIO_STORAGE_INTEGRATION } from "./minio" ;
56import { StorageIntegrations } from "./types" ;
67
78export const STORAGE_INTEGRATIONS : Record <
89 StorageIntegrations ,
910 IStorageIntegrationsImplemention < any >
1011> = {
1112 [ StorageIntegrations . S3 ] : AWS_STORAGE_INTEGRATION ,
13+ [ StorageIntegrations . MINIO ] : MINIO_STORAGE_INTEGRATION ,
1214 [ StorageIntegrations . CLOUDINARY ] : CLOUDINARY_STORAGE_INTEGRATION ,
1315 [ StorageIntegrations . GOOGLE ] : GOOGLE_STORAGE_INTEGRATION ,
1416} ;
Original file line number Diff line number Diff line change 1+ import { msg } from "@lingui/macro" ;
2+
3+ import type { IStorageIntegrationsImplemention } from "@/backend/storage/types" ;
4+
5+ export const MINIO_STORAGE_INTEGRATION : IStorageIntegrationsImplemention < {
6+ endpoint : string ;
7+ port : string ;
8+ accessKey : string ;
9+ secretKey : string ;
10+ } > = {
11+ title : "Minio" ,
12+ integrationConfigurationSchema : {
13+ endpoint : {
14+ label : msg `Endpoint` ,
15+ type : "text" ,
16+ validations : [
17+ {
18+ validationType : "required" ,
19+ } ,
20+ ] ,
21+ } ,
22+ port : {
23+ label : msg `Port` ,
24+ type : "text" ,
25+ validations : [
26+ {
27+ validationType : "required" ,
28+ } ,
29+ ] ,
30+ } ,
31+ accessKey : {
32+ label : msg `Access Key` ,
33+ type : "text" ,
34+ validations : [
35+ {
36+ validationType : "required" ,
37+ } ,
38+ ] ,
39+ } ,
40+ secretKey : {
41+ label : msg `Secret Key` ,
42+ type : "text" ,
43+ validations : [
44+ {
45+ validationType : "required" ,
46+ } ,
47+ ] ,
48+ } ,
49+ } ,
50+ store : async ( integrationConfig , file : File ) => {
51+ // const foo = new S3Client({
52+ // region: "string",
53+ // });
54+ // eslint-disable-next-line no-console
55+ console . log ( integrationConfig , file ) ;
56+ return "" ;
57+ } ,
58+ } ;
Original file line number Diff line number Diff line change 11export enum StorageIntegrations {
22 S3 = "s3" ,
3+ MINIO = "minio" ,
34 CLOUDINARY = "cloudinary" ,
45 GOOGLE = "google" ,
56}
You can’t perform that action at this time.
0 commit comments