change case loading in server side mode, made case list functional

This commit is contained in:
2025-06-19 16:01:07 +02:00
parent a2ac88af50
commit c5dd8b9424
8 changed files with 110 additions and 168 deletions

View File

@@ -1,6 +1,5 @@
import { BUCKET, client } from '$lib/minio';
export const checkIfExactDirectoryExists = (dir: string): Promise<boolean> => {
return new Promise<boolean>((resolve, reject) => {
const prefix = dir.endsWith('/') ? dir : `${dir}/`;
@@ -18,4 +17,11 @@ export const checkIfExactDirectoryExists = (dir: string): Promise<boolean> => {
stream.on('end', () => resolve(false));
});
}
};
export const getContentofTextObject = async (bucket: string, objPath: string) => {
const res = await client.getObject(bucket, objPath);
const text = await new Response(res).text();
return text;
};