mirror of
https://github.com/IrosTheBeggar/mStream.git
synced 2025-10-27 07:31:02 +00:00
fix download file
This commit is contained in:
parent
93d4041dc8
commit
3d0a0deaeb
@ -247,6 +247,7 @@ ul.jp-controls li {
|
||||
list-style-type: none !important; }
|
||||
|
||||
#downform {
|
||||
display: none;
|
||||
position: absolute; }
|
||||
|
||||
.controls div {
|
||||
|
||||
@ -90,11 +90,8 @@ var VUEPLAYER = (function () {
|
||||
MSTREAMPLAYER.removeSongAtPosition(this.index, false);
|
||||
},
|
||||
downloadSong: function (event) {
|
||||
$("#downform2").attr("action", "/media/" + this.song.filepath + "?token=" + MSTREAMAPI.currentServer.token);
|
||||
//submit form
|
||||
$('#downform2').submit();
|
||||
// clear the form
|
||||
$('#downform2').empty();
|
||||
$("#download-file").attr("href", "/media/" + this.song.filepath + "?token=" + MSTREAMAPI.currentServer.token);
|
||||
document.getElementById('download-file').click();
|
||||
},
|
||||
createPopper: function (event) {
|
||||
if (currentPopperSongIndex === this.index) {
|
||||
|
||||
@ -139,12 +139,10 @@
|
||||
|
||||
<!-- Download iFrame -->
|
||||
<form id="downform" action="" target="frameframe" method="POST"></form>
|
||||
<iframe id="downframe" src="" width="0" height="0" tabindex="-1" title="empty" class="hidden" hidden name="frameframe"></iframe>
|
||||
<iframe id="downframe" src="" width="0" height="0" tabindex="-1" title="empty" hidden name="frameframe"></iframe>
|
||||
|
||||
<!-- Download iFrame for GET requests -->
|
||||
<form id="downform2" action="" target="frameframe2" method="GET"></form>
|
||||
<iframe id="downframe2" src="" width="0" height="0" tabindex="-1" title="empty" class="hidden" hidden name="frameframe2"></iframe>
|
||||
|
||||
<a href="#" class="hide" download id="download-file" hidden></a>
|
||||
|
||||
<div class="off-canvas-wrap">
|
||||
<div class="inner-wrap">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user