misc: use only pathname to build image live preview URL (#88053)
gitea/wcs/pipeline/head This commit looks good
Details
gitea/wcs/pipeline/head This commit looks good
Details
Change introduced by #33301 used the full URL which may also contain a query string or a fragment identifier making the resulting URL invalid.
This commit is contained in:
parent
a130f1d862
commit
96bfaea4a7
|
@ -461,7 +461,7 @@ $.WcsFileUpload = {
|
|||
image_preview: function(base_widget, img_token) {
|
||||
var file_button = base_widget.find('.file-button');
|
||||
if(file_button.hasClass("file-image")) {
|
||||
file_button[0].style.setProperty('--image-preview-url', `url(${window.location.href}tempfile?t=${img_token}&thumbnail=1)`);
|
||||
file_button[0].style.setProperty('--image-preview-url', `url(${window.location.pathname}tempfile?t=${img_token}&thumbnail=1)`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue