change case loading in server side mode, made case list functional
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user