Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cps/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,13 @@ $(document).ready(function() {
return;
}

var currentURL = window.location.href;
var currentURLParts = currentURL.split("/");
currentURL = "/" + currentURLParts[3] + "/media";
console.log("Current URL:", currentURL);

$.ajax({
url: "/live/media",
url: currentURL,
method: "POST",
data: {
csrf_token: $("#mediaDownloadForm input[name=csrf_token]").val(),
Expand All @@ -207,7 +212,7 @@ $(document).ready(function() {
console.log("Media download request successful.");
}
},
error: function(xhr, status, error) {
error: function(error) {
// Handle error here
console.log("Media download request failed:", error);
$("#mediaDownloadForm .error-message").text("Media download request failed.");
Expand Down