【发布时间】:2015-07-25 05:50:47
【问题描述】:
我正在尝试在将图像插入网站之前确定它是否存在。
我已经尝试了所有方法 here 并且所有方法都对我知道存在的图像返回负值。例如:
$.ajax({
url:'https://s3-eu-west-1.amazonaws.com/stuffstory-v2-filepicker/thumbnails/5547b98e357a7f425f8b4570/555340a1357a7f673a8b456b.png',
type:'HEAD',
error:
function(){
console.log('No image')
},
success:
function(){
console.log('There is an image')
}
});
返回无图像结果,但如果您点击链接:Image 它显然就在那里。
我完全不知道为什么。
【问题讨论】: