Skip to content

Commit feb57b2

Browse files
committed
IE fix
1 parent 82843b1 commit feb57b2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lib/uploadhandler.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,16 @@ module.exports = function (options) {
2626
UploadHandler.prototype.noCache = function () {
2727
this.res.set({
2828
'Pragma': 'no-cache',
29-
'Cache-Control': 'no-store, no-cache, must-revalidate',
30-
'Content-Disposition': 'inline; filename="files.json"'
29+
'Cache-Control': 'no-store, no-cache, must-revalidate'
3130
});
31+
if ((this.req.get("Accept") || "").indexOf("application/json") != -1) {
32+
this.res.set({
33+
'Content-Type': 'application/json',
34+
'Content-Disposition': 'inline; filename="files.json"'
35+
});
36+
} else {
37+
this.res.set({ 'Content-Type': 'text/plain' });
38+
}
3239
};
3340

3441
UploadHandler.prototype.get = function () {

0 commit comments

Comments
 (0)