susee:log
This commit is contained in:
parent
ee71085eb5
commit
49847ba4fc
@ -219,7 +219,7 @@
|
|||||||
<%= data[i].file[j] %>
|
<%= data[i].file[j] %>
|
||||||
</li>
|
</li>
|
||||||
<button type="button" id="<%= data[i].file[j]+'|'+data[i].folder %>" class="btn btn-danger delete">Delete</button>
|
<button type="button" id="<%= data[i].file[j]+'|'+data[i].folder %>" class="btn btn-danger delete">Delete</button>
|
||||||
<a onclick="downloadImage('<%= data[i].img[j] %>')">Download link</a>
|
<a onclick="downloadImage('<%= data[i].img[j] %>' , '<%= data[i].file[j] %>')">Download link</a>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
@ -324,12 +324,12 @@ $(".delete").click(function(){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function downloadImage(data)
|
function downloadImage(data,fileName)
|
||||||
{
|
{
|
||||||
const base64Image = data; // Replace this with your actual Base64 image data
|
const base64Image = data; // Replace this with your actual Base64 image data
|
||||||
const downloadLink = document.createElement('a');
|
const downloadLink = document.createElement('a');
|
||||||
downloadLink.href = base64Image;
|
downloadLink.href = base64Image;
|
||||||
downloadLink.download = 'log.txt'; // Replace with the desired file name and extension
|
downloadLink.download = fileName; // Replace with the desired file name and extension
|
||||||
downloadLink.click();
|
downloadLink.click();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user