Skip to content
Back

Read file from Storage in Function

  • 0
  • Functions
  • Cloud
HackStackMaster
24 Nov, 2024, 16:58

how to read html file from storage in function

TypeScript
const invoiceTemplate = await storage.getFileDownload(
   process.env.BUCKET_ID,
   '<File ID>'
 )

what will be the result of above code ? I want to read the file as html string Have anyone worked on this ?

TL;DR
Developers are asking how to read an HTML file from storage in a function. The provided code snippet using `getFileDownload` from storage seems to be the solution.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more