Merge branch 'main' into fix/large-files-storage-backend-v3

# Conflicts:
#	src/features/storages/providers/s3.ts
This commit is contained in:
charlesgauthereau
2026-02-11 11:54:09 +01:00
11 changed files with 51 additions and 23 deletions
@@ -94,7 +94,7 @@ export const AgentForm = (props: agentFormProps) => {
<FormItem>
<FormLabel>Description</FormLabel>
<FormControl>
<Input placeholder="This agent is for the client exemple.com" {...field}
<Input placeholder="This agent is for the client example.com" {...field}
value={field.value ?? ""}/>
</FormControl>
<FormDescription>Enter your project agent description</FormDescription>
+9 -2
View File
@@ -1,17 +1,23 @@
"use server";
import {eq} from 'drizzle-orm';
import {Json} from "drizzle-zod";
import * as drizzleDb from '@/db';
import {db} from '@/db';
import type {StorageInput, StorageProviderKind, StorageResult,} from './types';
import {dispatchViaProvider} from "@/features/storages/providers";
import {StorageChannel} from "@/db/schema/12_storage-channel";
import {Json} from "drizzle-zod";
import {
StorageChannelFormType
} from "@/components/wrappers/dashboard/admin/channels/channel/channel-form/channel-form.schema";
export async function dispatchStorage(
input: StorageInput,
policyId?: string,
channelId?: string,
channelData?: StorageChannelFormType,
organizationId?: string
): Promise<StorageResult> {
try {
@@ -68,6 +74,8 @@ export async function dispatchStorage(
};
}
if (channelData) channel = {...channelData, config: channelData.config as Json};
if (!channel) {
return {
success: false,
@@ -90,7 +98,6 @@ export async function dispatchStorage(
channel.provider as StorageProviderKind,
channel.config,
input,
);
+2
View File
@@ -4,6 +4,7 @@ import {Readable} from "node:stream";
type S3Config = {
endPointUrl: string;
region?: string;
accessKey: string;
secretKey: string;
bucketName: string;
@@ -14,6 +15,7 @@ type S3Config = {
async function getS3Client(config: S3Config) {
return new Minio.Client({
endPoint: config.endPointUrl,
region: config.region ?? "us-east-1",
accessKey: config.accessKey,
secretKey: config.secretKey,
port: config.port ?? 443,