Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
fixed: in Chrome, when loading a record with a file, the download but…
Browse files Browse the repository at this point in the history
…ton does not work and shows 'Failed - Server problem',

https://github.com/OpenClinica/enketo-express-oc/issues/317
  • Loading branch information
MartijnR committed Mar 30, 2020
1 parent e129b25 commit 9c3e347
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

[Unreleased]
----------------------
##### Fixed
- In Chrome, when loading a record with a file, the download button does not work and shows 'Failed - Server problem'.

[2.0.1] - 2020-03-26
----------------------
**WARNING: IT IS HIGHLY RECOMMENDED TO DEPLOY THIS VERSION BEFORE CHROME 83 IS RELEASED SOME TIME IN APRIL 2020 AND PREFERABLY AFTER VERSION 1.86.x HAS BEEN DEPLOYED. READ MORE [HERE](https://blog.enketo.org/Enketo-Express-mar-2020-update/).**
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/media-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function _extractMediaUrl( path ) {


function _isPrintView( req ) {
const refererQuery = url.parse( req.headers.referer ).query;
const refererQuery = req.headers && req.headers.referer ? url.parse( req.headers.referer ).query : null;
return !!( refererQuery && refererQuery.includes( 'print=true' ) );
}

Expand Down

0 comments on commit 9c3e347

Please sign in to comment.