mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
improved media settings implementation
This commit is contained in:
@@ -16,7 +16,8 @@ export function buildMediaSchema() {
|
||||
config: adapter.schema
|
||||
},
|
||||
{
|
||||
title: name,
|
||||
title: adapter.schema.title ?? name,
|
||||
description: adapter.schema.description,
|
||||
additionalProperties: false
|
||||
}
|
||||
);
|
||||
@@ -32,6 +33,7 @@ export function buildMediaSchema() {
|
||||
{
|
||||
body_max_size: Type.Optional(
|
||||
Type.Number({
|
||||
minimum: 0,
|
||||
description: "Max size of the body in bytes. Leave blank for unlimited."
|
||||
})
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@ export const cloudinaryAdapterConfig = Type.Object(
|
||||
api_secret: Type.String(),
|
||||
upload_preset: Type.Optional(Type.String())
|
||||
},
|
||||
{ title: "Cloudinary" }
|
||||
{ title: "Cloudinary", description: "Cloudinary media storage" }
|
||||
);
|
||||
|
||||
export type CloudinaryConfig = Static<typeof cloudinaryAdapterConfig>;
|
||||
|
||||
@@ -7,7 +7,7 @@ export const localAdapterConfig = Type.Object(
|
||||
{
|
||||
path: Type.String({ default: "./" })
|
||||
},
|
||||
{ title: "Local" }
|
||||
{ title: "Local", description: "Local file system storage" }
|
||||
);
|
||||
export type LocalAdapterConfig = Static<typeof localAdapterConfig>;
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ export const s3AdapterConfig = Type.Object(
|
||||
})
|
||||
},
|
||||
{
|
||||
title: "S3"
|
||||
title: "AWS S3",
|
||||
description: "AWS S3 or compatible storage"
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user