Fixed image extension case insensitive

This commit is contained in:
benweet 2013-10-14 00:50:31 +01:00
parent 94ad187c91
commit 537a304906
3 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
CACHE MANIFEST
#Date Mon Oct 14 2013 00:32:24
#Date Mon Oct 14 2013 00:50:07
CACHE:
index.html

View File

@ -27083,7 +27083,7 @@ if (hljs.LANGUAGES.glsl = function(e) {
var o = {
Slug: e
};
e.match(/.jpe?g$/) ? o["Content-Type"] = "image/jpeg" : e.match(/.png$/) ? o["Content-Type"] = "image/png" : e.match(/.gif$/) && (o["Content-Type"] = "image/gif");
e.match(/.jpe?g$/i) ? o["Content-Type"] = "image/jpeg" : e.match(/.png$/i) ? o["Content-Type"] = "image/png" : e.match(/.gif$/i) && (o["Content-Type"] = "image/gif");
var s = gapi.auth.getToken();
s && (o.Authorization = "Bearer " + s.access_token), t.ajax({
url: PICASA_PROXY_URL + "upload/" + i,

View File

@ -301,13 +301,13 @@ define([
var headers = {
"Slug": name
};
if(name.match(/.jpe?g$/)) {
if(name.match(/.jpe?g$/i)) {
headers["Content-Type"] = "image/jpeg";
}
else if(name.match(/.png$/)) {
else if(name.match(/.png$/i)) {
headers["Content-Type"] = "image/png";
}
else if(name.match(/.gif$/)) {
else if(name.match(/.gif$/i)) {
headers["Content-Type"] = "image/gif";
}
var token = gapi.auth.getToken();