Skip to content

Commit

Permalink
fix(windows): don't use illegal characters for default text file file…
Browse files Browse the repository at this point in the history
…name (#279)

`:` is not allowed in windows filename
  • Loading branch information
NateScarlet authored Nov 11, 2023
1 parent 335402b commit c759295
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/pages.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ var Upload = `
var textCheckbox = document.getElementById('check-send-text')
if ((titleInput.value || textInput.value) && textCheckbox.checked) {
var currentDate = new Date().toJSON().slice(0,19).replace(/[-T]/g,'_')
var currentDate = new Date().toJSON().slice(0,19).replace(/[-T:]/g,'_')
// If the user didn't specify a file name, use 'qrcp-text-file-${currentDate}'
var filename = titleInput.value || ("qrcp-text-file-" + currentDate)
var blob = new Blob([textInput.value + '\n'], { type: "text/plain" })
Expand Down

0 comments on commit c759295

Please sign in to comment.