Add SWF files to the allowed mimetypes for /f/.
This commit is contained in:
parent
2cb60cef3f
commit
823450400b
@ -1730,7 +1730,7 @@
|
||||
if (QR.spoiler) {
|
||||
$('label', this.el).hidden = false;
|
||||
}
|
||||
if (file.type === 'application/pdf') {
|
||||
if (!/^image/.test(file.type)) {
|
||||
this.el.style.backgroundImage = null;
|
||||
return;
|
||||
}
|
||||
@ -1997,6 +1997,8 @@
|
||||
return 'image/jpeg';
|
||||
case 'pdf':
|
||||
return 'application/pdf';
|
||||
case 'swf':
|
||||
return 'application/x-shockwave-flash';
|
||||
default:
|
||||
return "image/" + type;
|
||||
}
|
||||
|
||||
@ -1284,7 +1284,7 @@ QR =
|
||||
setFile: (@file) ->
|
||||
@el.title = "#{file.name} (#{$.bytesToString file.size})"
|
||||
$('label', @el).hidden = false if QR.spoiler
|
||||
if file.type is 'application/pdf'
|
||||
unless /^image/.test file.type
|
||||
@el.style.backgroundImage = null
|
||||
return
|
||||
url = window.URL or window.webkitURL
|
||||
@ -1408,8 +1408,8 @@ QR =
|
||||
$.after $('.captchaimg', QR.el), $.el 'div',
|
||||
className: 'captchainput'
|
||||
innerHTML: '<input title=Verification class=field autocomplete=off size=1>'
|
||||
@img = $ '.captchaimg > img', QR.el
|
||||
@input = $ '.captchainput > input', QR.el
|
||||
@img = $ '.captchaimg > img', QR.el
|
||||
@input = $ '.captchainput > input', QR.el
|
||||
$.on @img.parentNode, 'click', @reload
|
||||
$.on @input, 'keydown', @keydown
|
||||
$.on @challenge, 'DOMNodeInserted', => @load()
|
||||
@ -1489,6 +1489,8 @@ QR =
|
||||
'image/jpeg'
|
||||
when 'pdf'
|
||||
'application/pdf'
|
||||
when 'swf'
|
||||
'application/x-shockwave-flash'
|
||||
else
|
||||
"image/#{type}"
|
||||
QR.mimeTypes = mimeTypes.split ', '
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user