Add hotlinking link
This commit is contained in:
parent
d5a67aa86e
commit
6ecb2f5937
1 changed files with 11 additions and 4 deletions
|
@ -11,10 +11,17 @@
|
||||||
<h3>{{ file.get_original_filename }}</h3>
|
<h3>{{ file.get_original_filename }}</h3>
|
||||||
<h5>Created at: {{ file.created }}</h5>
|
<h5>Created at: {{ file.created }}</h5>
|
||||||
</div>
|
</div>
|
||||||
|
{% if file.hotlink %}
|
||||||
<a class="btn btn-primary btn-block btn-lg download-button" href="{% url 'files:file_download' file.short_id token.token %}">
|
<a class="btn btn-primary btn-block btn-lg download-button" href="{% url 'files:file_download' file.short_id token.token %}">
|
||||||
Download {{ file.get_original_filename }}
|
Download {{ file.get_original_filename }}
|
||||||
</a>
|
</a>
|
||||||
<p class="timer-message">This download link is only valid for <span class="timer" data-duration="{{ token.valid_time.seconds }}"></span>.</p>
|
<p class="timer-message">This download link is only valid for <span class="timer" data-duration="{{ token.valid_time.seconds }}"></span>.</p>
|
||||||
|
{% else %}
|
||||||
|
<a class="btn btn-primary btn-block btn-lg download-button" href="{% url 'files:file_hot' file.short_id %}">
|
||||||
|
Download {{ file.get_original_filename }}
|
||||||
|
</a>
|
||||||
|
<p>Hotlinking is enabled for this file.</p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Reference in a new issue