Skip to content

Commit a46940f

Browse files
committed
strip hash and querystring
1 parent 9f0ecb9 commit a46940f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/qiniu.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ function QiniuJsSDK() {
182182
* @return {Boolean} file is a image or not
183183
*/
184184
this.isImage = function(url) {
185+
url = url.split(/[?#]/)[0];
185186
return (/\.(png|jpg|jpeg|gif|bmp)$/i).test(url);
186187
};
187188

0 commit comments

Comments
 (0)