495 B
495 B
File handling
-
Client(browser)
const encryptedFileInput = document.getElementById("encryptedFileInput"); const encryptedFile = encryptedFileInput.files[0]; // Read the encrypted file const encryptedData = await encryptedFile.arrayBuffer(); -
arrayBuffer vs blob blob is immutable and is the data type when we submit the file in form in client(browser) arraybuffer is the binary representation of file as thats how
fs.readFileSyncreturns it