Tus Android client - retrieve uploaded video id

Hey All!

I’m using tus android client to upload videos on Cloudflare servers. After the upload complete, does the tus implementation for Android provide a way to get the freshly uploaded video id?

I have seen that I can parse the upload url to get it… but thinking is not very future-safe solution.

Is there another way… e.g through a specific header that I could access?

Thanks a lot!

Hello, there is no other way to get the upload ID than parsing the upload ID. The reason is that an upload ID is a server-specific concept. The tus protocol itself only knows upload URLs and server can freely choose how to construct these URLs. Hence, there is not standardized URL format and thus tus-java-client cannot provide a way to extract the upload ID from URLs. That part has to be done by you depending on the used tus server.

e.g through a specific header that I could access?

If CloudFlare makes this information available, then yes, you can also access it that way.

1 Like