blue-gold-89534
10/16/2022, 9:25 PMhx-get?
python
def startDownload(request, pk = None):
file_path = "... path to file ..."
return FileResponse(open(file_path, "rb"), as_attachment = True)
and in the template:
html
<img src="{% static 'images/printer.svg' %}"
hx-get="{% url 'download' model.pk %}"
hx-trigger="click">
I can see the png I am trying to load in the webdev console response, but no save dialogue is showing. Is hx-get the right choice?