Fixing #1900 JS SDK file upload (#1935)

* Fixing #1900 JS SDK file upload

JS SDK file upload uses req.body._ContentType to specify the upload content type

* Fixing import statements

* Dont clear the cache just delete the new entry that the test added.

* adding E2E test for _ContentType support
This commit is contained in:
Blayne Chard
2016-05-31 13:42:45 +12:00
committed by Florent Vilmart
parent cd525802a6
commit 3997b1aa5a
3 changed files with 96 additions and 0 deletions

View File

@@ -84,6 +84,10 @@ function handleParseHeaders(req, res, next) {
info.masterKey = req.body._MasterKey;
delete req.body._MasterKey;
}
if (req.body._ContentType) {
req.headers['content-type'] = req.body._ContentType;
delete req.body_contentType;
}
} else {
return invalidRequest(req, res);
}