Skip to content

Commit

Permalink
Merge pull request #2205 from bcgov/1.10.5
Browse files Browse the repository at this point in the history
Test for file name error
  • Loading branch information
bcgov-brwang authored May 11, 2022
2 parents e07a2d1 + f3752f4 commit a14a215
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client/src/js/views/dialogs/DocumentsListDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ class DocumentsListDialog extends React.Component {
//use Header content-disposition for the file name
//looks like ""attachment; filename=adobe.pdf; filename*=UTF-8''adobe.pdf""
console.log(res.getResponseHeader('content-disposition'));
fName = res.getResponseHeader('content-disposition').match(/(?<=filename=")(.*)(?="; filename)/)[0];
console.log(fName);
fName = res.getResponseHeader('content-disposition').match(/(?<=filename=)(.*)(?=; filename)/)[0];
console.log(fName);
saveAs(res.response, fName);
})
.catch((error) => {
Expand Down

0 comments on commit a14a215

Please sign in to comment.