Back

How to get the URL of a file from the Storage Bucket

  • 0
  • Android
Chirag_doosra
19 Jul, 2024, 11:04

I'm developing an Android app using Kotlin and Appwrite. I want to get the URL of the file so that I can download it. Is there any method to achieve that? The code below return a ByteArray. I want to get the URL of the file.

TypeScript
                    bucketId = "660fd3e8a1341d1deb24",
                    fileId = "669a37030001cf108f01"
                )```
What can be solution to this apart from manually building the link?
TL;DR
Developers wants to get the URL of a file from a Storage Bucket in an Android app using Kotlin and Appwrite. There is a method to achieve this other than manually building the link. The URL can be obtained by appending the `result` object's `$this->temporary_url` property to the Appwrite server URL.
Ryan
19 Jul, 2024, 11:51

Is the file that you are trying to access public? And is this on Cloud or self-hosted?

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