AAhmed - 1 year ago 86
HTML Question

I am developing a simple website, where users can input some data through a form and by using the data some work will be done which will generate some image and text files in a folder in server. Now, during the submission of the form the user will be provided with a job id and the resulting folder path would be annotated with the same id. In a search box user will be able to download their results by id.

The problem is, how to provide those resulting files to the user to download?

{% extends "personal/header.html" %}
{% block content %}
<h4>Here is the result for you</h4>
<h4>Last name: {{ resultRow.last_name }}</h4>

<hr>
<h4>path: {{ complementRow.path_for_folder }}</h4>

{% endblock %}


So, the question is, is the error because of development server or am I doing something wrong? If I am wrong please suggest me right way.
Note: I will use "complementRow.path_for_folder" for specifying the file. Here I have used an instantiation of the variable.

I can post viwes.py file or whatever needed to understand

It is because the url in the <a/> is invalid
<a href='C:\Users\path\to\heatmap.png' download="img">Heatmap</a>

On the user's browser, this path C:\Users\path\to\heatmap.png is telling the browser to load a file from C:\Users\path\to in the user's local harddisk. It is not what you intended