Skip to content

Commit

Permalink
Strip surrounding text from uploaded Galaxy file
Browse files Browse the repository at this point in the history
- Uses a helper isGalaxyFile() to check for Galaxy file syntax.

- Handles the rename gracefully with a confirmation pop-up.
  • Loading branch information
GomeChas committed Jul 18, 2024
1 parent 1dbe70f commit 9201780
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion client/src/utils/upload-payload.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export function uploadPayload(items, historyId, composite = false) {
}
if (isGalaxyFile(fileName)) {
const modifiedFileName = fileName.replace(/Galaxy\d+-\[(.*?)\](\..+)/, "$1");

const keepModifiedName = confirm(`This looks like a previous Galaxy file. We have renamed it.\n\nOriginal Name: ${fileName}\nModified Name: ${modifiedFileName}\n\n Do you want to keep the modified name?`)
if (keepModifiedName) {
fileName = modifiedFileName;
Expand Down

0 comments on commit 9201780

Please sign in to comment.