initial
This commit is contained in:
commit
74ae93a96e
1 changed files with 94691 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
File handling
|
||||
|
||||
- Client(browser)
|
||||
|
||||
```jsx
|
||||
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.readFileSync` returns it
|
||||
Loading…
Reference in a new issue