Skip to content
Back

getFileView and getFileDownload Unexepcted results

  • 0
  • React Native
duncan
24 Jul, 2025, 21:33

pdfUrl = storage.getFileDownload(appwriteConfig.bucketId, doc.pdf); console.log("getFileView awaited result:", pdfUrl, "| type:", typeof pdfUrl);

I was expecting to get a resource URL like the docs suggest but instead I get:

getFileView awaited result: {"_h": 0, "_i": 0, "_j": null, "_k": null} | type: object

What am I even looking at? And if I await the result I get an empty array []

TL;DR
Method getFileDownload actually downloads the file data. Instead, use another method to get the URL. The current result is an empty object, not a URL.
Steven
24 Jul, 2025, 21:43

We need to update these docs. That method now downloads the actual file data. There's another method for getting the URL

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