Skip to content

Commit

Permalink
add todo comment to support directory and filePath include wildcards …
Browse files Browse the repository at this point in the history
…'*', detail refer: kubeflow#4208
  • Loading branch information
haibingzhao committed Jul 16, 2020
1 parent 6e9a6c0 commit e23bb2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/server/handlers/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,15 @@ function getFileArtifactsHandler(
return async (req: Request, res: Response) => {
try{
if (!fs.existsSync(filePath)) {
res.status(500).send(`Failed to read local file: ${filePath}, check file is exist`);
res.status(500).send(`Failed to open local file: ${filePath}, please check if file is exist`);
return;
}

// currently not support directory
// TODO: support directory and filePath include wildcards '*'
const stat = fs.statSync(filePath);
if (stat.isDirectory()) {
res.status(500).send(`Failed to read local file: ${filePath}, directory does not currently support`);
res.status(500).send(`Failed to read local file: ${filePath}, directory does not support`);
return;
}

Expand Down

0 comments on commit e23bb2b

Please sign in to comment.