Sergidev commited on
Commit
b2f39b5
·
verified ·
1 Parent(s): 5b0a7e4

Update static/script.js

Browse files
Files changed (1) hide show
  1. 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/mpeg';
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.mp3';
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 => {