From c1dd7b894a52fad05b3deeadba679284de34b3cf Mon Sep 17 00:00:00 2001 From: David Cook Date: Mon, 29 Apr 2024 01:36:02 +0000 Subject: [PATCH] Bug 36700: Fix CSRF-TOKEN header in image upload --- koha-tmpl/intranet-tmpl/prog/js/upload-images.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/upload-images.js b/koha-tmpl/intranet-tmpl/prog/js/upload-images.js index b2349a55eff..c81a75d9d39 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/upload-images.js +++ b/koha-tmpl/intranet-tmpl/prog/js/upload-images.js @@ -124,7 +124,7 @@ function AjaxUpload ( formData, progressbar, xtra, callback ) { progressbar.val( 0 ); progressbar.next('.fileuploadpercent').text( '0' ); xhr.open('POST', url, true); - xhr.setRequestHeader("csrf_token", $('meta[name="csrf-token"]').attr("content")); + xhr.setRequestHeader("CSRF-TOKEN", $('meta[name="csrf-token"]').attr("content")); xhr.upload.onprogress = function (e) { var p = Math.round( (e.loaded/e.total) * 100 ); progressbar.val( p ); -- 2.30.2