1. After the image is uploaded successfully, the GET request to https://console.xxx.cn/upload/20210319/20210385015127.png returns a 500 response. The root cause is that the domain for the uploaded image is not https://console.xxx.cn, but rather https://web.xxx.cn. See Figure 1.

2. Open the Initiator tab to check the request call stack. The GET request is executed at line 516 of the page. See Figure 2.

3. Click to view the JS code. The jQuery attribute operation – attr() method sets the src attribute. See Figure 3.

goodsSl.on('uploadSuccess', function (file, json) {
$('.edit_img_tipthumb').attr("src", json.theUrl);
$('input[name="data[Product][thumb_img]"]').val(json.theUrl);
})
4. The value of json.theUrl is /upload/20210319/20210385015127.png. I decided to use an absolute address by adding the domain prefix: https://web.xxx.cn. The edited code is as follows:
goodsSl.on('uploadSuccess', function (file, json) {
$('.edit_img_tipthumb').attr("src", 'https://web.xxx.cn/creditshop_back' + json.theUrl);
$('input[name="data[Product][thumb_img]"]').val(json.theUrl);
})
5. After the image is uploaded successfully, the GET request to https://web.xxx.cn/upload/20210319/20210385015127.png returns a 200 response. See Figure 3.

