How to generate "public" download link

Hi there!

I have a scenario where I have and Entity called Installer that represents an Android App installer, with fields like versionName, versionCode and apkFile (FileDescriptor). My ideia is generate a “public” link for the APK file in order to download it in an Android device, but I’m stucked in how to get it.

Can you help me?

Thank you.

Hi,

Assuming that you use Generic UI (web module), I would recommend creating a Spring MVC controller with a method returning the file content. See the docs for how to configure custom controllers.
You may also need to authenticate in your controller, see an example here.

Regards,
Konstantin

1 Like

Yeah! Works! Thank you! =)