Skip to content

Commit

Permalink
mobile: fix image and file uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Dec 30, 2024
1 parent 724c696 commit f09e5ca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion apps/mobile/app/screens/editor/tiptap/picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ export async function attachFile(
encryptionInfo.mimeType = type;
encryptionInfo.filename = filename;
encryptionInfo.alg = "xcha-stream";
encryptionInfo.size = encryptionInfo.length;
encryptionInfo.key = key;
if (options?.reupload && exists) {
const attachment = await db.attachments.attachment(hash);
Expand All @@ -397,6 +396,7 @@ export async function attachFile(
} else {
encryptionInfo = { hash: hash };
}
console.log("FILE ENCRYPTED....", encryptionInfo);
await db.attachments.add(encryptionInfo);
return true;
} catch (e) {
Expand Down
1 change: 0 additions & 1 deletion apps/mobile/app/utils/note-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export async function attachFile(uri, hash, type, filename, options) {
encryptionInfo.mimeType = type;
encryptionInfo.filename = filename;
encryptionInfo.alg = "xcha-stream";
encryptionInfo.size = encryptionInfo.length;
encryptionInfo.key = key;
console.log(encryptionInfo);
if (options?.reupload && exists) await db.attachments.reset(hash);
Expand Down

0 comments on commit f09e5ca

Please sign in to comment.