How can i serve static files from a liveview

Hello . I am looking for a way i can enable a user to download files from a liveview . Is there a possible way to do this ??

some button is pressed and then file is downloaded

Guesswork:

<a href="<%= Routes.file_path(@socket, :download) %>">Download PDF</a>

You can check out a solution here: With Liveview, what is best way to download a file to the user's browser? (redirect through Phoenix Controller and back to Liveview, or use a background Task?) - #17 by Miserlou