import pdf from 'pdf-parse';
import fs from 'fs';
 
 
export class StoryLoader{

    async loader(url:string){
       
        return data
    }
}

export async function fetchFileBuffer(url: string): Promise<Buffer> {
    const response = await fetch(url);

    if (!response.ok) {
        throw new Error(`Failed to fetch file: ${response.status} ${response.statusText}`);
    }

    const arrayBuffer = await response.arrayBuffer();
    return Buffer.from(arrayBuffer);
}