Spaces:
Paused
Paused
Commit
·
af58239
1
Parent(s):
bd1a77c
Update templates/output.html
Browse files- templates/output.html +5 -6
templates/output.html
CHANGED
|
@@ -159,12 +159,11 @@
|
|
| 159 |
|
| 160 |
<script>
|
| 161 |
function downloadImage() {
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
function toggleImageSize(image) {
|
| 169 |
if (image.classList.contains('enlarged')) {
|
| 170 |
image.classList.remove('enlarged');
|
|
|
|
| 159 |
|
| 160 |
<script>
|
| 161 |
function downloadImage() {
|
| 162 |
+
var link = document.createElement('a');
|
| 163 |
+
link.href = '{{ url_for('download_output', filename=filename) }}';
|
| 164 |
+
link.download = 'generated_image.jpg';
|
| 165 |
+
link.click();
|
| 166 |
+
}
|
|
|
|
| 167 |
function toggleImageSize(image) {
|
| 168 |
if (image.classList.contains('enlarged')) {
|
| 169 |
image.classList.remove('enlarged');
|