Skip to content

Commit 3da2503

Browse files
steve-stencilcmozingoleap
authored andcommitted
Merged in files-not-working-with-chrome (pull request parse-community#2)
added logic to handle query params
2 parents 789ad6c + ec39e94 commit 3da2503

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@leapllc/parse-server",
3-
"version": "4.4.0",
3+
"version": "4.4.1",
44
"publishConfig": {
55
"access": "restricted"
66
},

src/Routers/FilesRouter.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ export class FilesRouter {
7979
const config = Config.get(req.params.appId);
8080
const filesController = config.filesController;
8181
const filename = req.params.filename;
82-
const contentType = mime.getType(filename);
82+
const [name] = filename.split('?');
83+
const contentType = mime.getType(name);
84+
8385
if (isFileStreamable(req, filesController)) {
8486
filesController
8587
.handleFileStream(config, filename, req, res, contentType)

0 commit comments

Comments
 (0)