getContentDisposition = (name, downloadFlag) => {
  const dispositionType = downloadFlag === 'true' ? 'attachment;' : 'inline;';

  const encodedName = encodeURIComponent(name);
  const dispositionName = `filename="${encodedName}"; filename=*UTF-8"${encodedName}";`;
  const dispositionEncoding = 'charset=utf-8';

  return `${dispositionType} ${dispositionName} ${dispositionEncoding}`;
}
will initiate download, if links are called with ?download="true" queryparam