ai-tube / src /app /server /actions /ai-tube-hf /downloadPlainText.ts
jbilcke-hf's picture
jbilcke-hf HF staff
just a lil bit of plumbing
1185ec1
raw
history blame
317 Bytes
export async function downloadPlainText(url: string): Promise<string> {
// Fetch the plain text file
const response = await fetch(url)
if (!response.ok) {
throw new Error(`Failed to download the plain/text file: ${response.statusText}`)
}
const plainText = await response.text()
return plainText
}