Update static/script.js
Browse files- static/script.js +2 -2
static/script.js
CHANGED
@@ -52,7 +52,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
52 |
function handleFiles(files) {
|
53 |
if (files.length > 0) {
|
54 |
currentFile = files[0];
|
55 |
-
isDecrypting = currentFile.type === 'audio/
|
56 |
options.style.display = 'block';
|
57 |
processButton.textContent = isDecrypting ? 'Decrypt' : 'Encrypt';
|
58 |
dropArea.textContent = `File selected: ${currentFile.name}`;
|
@@ -92,7 +92,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
92 |
audioPlayer.src = url;
|
93 |
}
|
94 |
downloadLink.href = url;
|
95 |
-
downloadLink.download = isDecrypting ? 'decrypted_file' : 'encrypted.
|
96 |
console.log('File processed successfully. Size:', blob.size, 'bytes');
|
97 |
})
|
98 |
.catch(error => {
|
|
|
52 |
function handleFiles(files) {
|
53 |
if (files.length > 0) {
|
54 |
currentFile = files[0];
|
55 |
+
isDecrypting = currentFile.type === 'audio/wav';
|
56 |
options.style.display = 'block';
|
57 |
processButton.textContent = isDecrypting ? 'Decrypt' : 'Encrypt';
|
58 |
dropArea.textContent = `File selected: ${currentFile.name}`;
|
|
|
92 |
audioPlayer.src = url;
|
93 |
}
|
94 |
downloadLink.href = url;
|
95 |
+
downloadLink.download = isDecrypting ? 'decrypted_file' : 'encrypted.wav';
|
96 |
console.log('File processed successfully. Size:', blob.size, 'bytes');
|
97 |
})
|
98 |
.catch(error => {
|