diff --git a/4chan_x.user.js b/4chan_x.user.js index 40e4328dd..d16cc2cbf 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1795,6 +1795,7 @@ } }); qr.mimeTypes = mimeTypes.split(', '); + qr.mimeTypes.push(''); fileInput = $('[type=file]', qr.el); fileInput.max = $('[name=MAX_FILE_SIZE]').value; fileInput.accept = mimeTypes; diff --git a/script.coffee b/script.coffee index d60d37e7c..72daadcfd 100644 --- a/script.coffee +++ b/script.coffee @@ -1456,7 +1456,9 @@ qr = 'application/pdf' else "image/#{type}" - qr.mimeTypes = mimeTypes.split ', ' + qr.mimeTypes = mimeTypes.split ', ' + # Add empty mimeType to avoid errors with URLs selected in Window's file dialog. + qr.mimeTypes.push '' fileInput = $ '[type=file]', qr.el fileInput.max = $('[name=MAX_FILE_SIZE]').value fileInput.accept = mimeTypes