Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open sandbox files from SingularityUI #1854

Merged
merged 5 commits into from
Sep 27, 2018
Merged

Open sandbox files from SingularityUI #1854

merged 5 commits into from
Sep 27, 2018

Conversation

ssalinas
Copy link
Member

Adds an open endpoint that guesses at content type, allowing certain extensions to be opened from the UI

/fixes #1357

@@ -180,6 +180,10 @@ class TaskDetail extends Component {

file.fullPath = `${files.fullPathToRoot}/${files.currentDirectory}/${file.name}`;
file.downloadLink = `${config.apiRoot}/tasks/download?slaveHostname=${files.slaveHostname}&path=${file.fullPath}`;
const extensionMatcher = /(?:\.([^.]+))?$/;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using something like FilenameUtils.getExtension(fileName); instead of a regex for clarity?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

java(script) :lol:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, javascript 🤦

@pschoenfelder
Copy link
Contributor

🚢

@ssalinas ssalinas merged commit 2b7a926 into master Sep 27, 2018
@ssalinas ssalinas deleted the open_sandbox_files branch September 27, 2018 12:41
@ssalinas ssalinas added this to the 0.22.0 milestone Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Singularity file browser / downloader should provide correct Content-Type headers
2 participants