Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
floki1250 committed Mar 21, 2024
1 parent 08c244b commit c386806
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions pages/Send.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,29 +222,6 @@ const handleSendFile = async () => {
};
};
async function scan() {
reader.readAsArrayBuffer(file.value);
reader.onload = () => {
const fileData = {
name: file.value.name,
type: file.value.type,
size: file.value.size,
chunks: [],
};
const chunkSize = 15 * 1024 * 1024; // Adjust chunk size as needed
for (let i = 0; i < reader.result.byteLength; i += chunkSize) {
const chunk = reader.result.slice(i, i + chunkSize);
fileData.chunks.push(chunk);
}
sendFile(fileData);
};
/*const reader = new FileReader();
reader.readAsDataURL(file.value);
reader.onload = () => sendFile(reader.result);*/
}
async function scan() {
qrscannerEl.value = true;
try {
Expand Down

0 comments on commit c386806

Please sign in to comment.