Skip to content

Commit

Permalink
partially encode filepaths for pathdb
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Jan 11, 2024
1 parent ffdf743 commit b548f3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion handlers/pathdbIipHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ iipCheck = function(req, res, next) {
console.log(x);
// get path
if (x && x['field_iip_path'] && x['field_iip_path'].length && x['field_iip_path'][0]['value']) {
req.newFilepath = x['field_iip_path'][0]['value'];
newFilepath = x['field_iip_path'][0]['value'];
newFilepath = encodeURIComponent(newFilepath);
newFilepath = newFilepath.replaceAll("%2F", "/");
req.newFilepath = newFilepath;
console.log(req.newFilepath);
next();
} else {
Expand Down

0 comments on commit b548f3a

Please sign in to comment.