diff --git a/.github/workflows/stale_issues.yml b/.github/workflows/stale_issues.yml new file mode 100644 index 000000000..b46c3d012 --- /dev/null +++ b/.github/workflows/stale_issues.yml @@ -0,0 +1,17 @@ +name: 'Stale Issues and PRs' +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' + stale-pr-message: 'This PR is stale because it has been open 45 days with no activity.' + close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' + days-before-stale: 30 + days-before-close: 5 + days-before-pr-close: -1 diff --git a/apps/table.html b/apps/table.html index ae8075125..ce1aae5c7 100644 --- a/apps/table.html +++ b/apps/table.html @@ -212,7 +212,7 @@

Steps for uploading.

diff --git a/apps/table.js b/apps/table.js index a84ee48aa..6ae19530c 100644 --- a/apps/table.js +++ b/apps/table.js @@ -714,8 +714,22 @@ function fileNameChange() { const fileName = fileNameInput.val(); let newFileName = fileName.split(' ').join('_'); fileNameInput.val(newFileName); - let fileExtension = newFileName.toLowerCase().split('.').reverse()[0]; - if (!allowedExtensions.includes(fileExtension)) { + let fileParts = newFileName.split('.'); + let fileExtension = fileParts.length > 1 ? fileParts.reverse()[0].toLowerCase() : null; + if (!fileExtension) { + fileNameInput.addClass('is-invalid'); + let fDiv = document.getElementById('filename-feedback0'); + + if (!fDiv) { + fileNameInput.addClass('is-invalid'); + let fDiv = document.createElement('div'); + fDiv.classList.add('invalid-feedback'); + fDiv.id = 'filename-feedback0'; + fDiv.textContent = 'The file name you provided is incompatible. File names should follow this format "filename.ext"'; + fileNameInput.parent().append(fDiv); + } + + } else if (!allowedExtensions.includes(fileExtension)) { fileNameInput.addClass('is-invalid'); let fDiv = document.createElement('div'); fDiv.classList.add('invalid-feedback'); @@ -734,6 +748,8 @@ function fileNameChange() { } } } + + function switchToFile() { $('.urlUploadClass').css('display', 'none'); $('.fileInputClass').css('display', 'block');