Send files directly between devices over the internet - no cloud storage, no size limits.
TypeScript cross-platformdata-transferdecentralizedfile-sharingfile-transferhole-punchingopen-sourcep2ppeer-to-peerprivacyprivacy-tools
save received media to photos instead of files
Denis Lupookov886ab2857149
diff --git a/apps/mobile/src/transfer/receive/utils/downloadHandlers.ts b/apps/mobile/src/transfer/receive/utils/downloadHandlers.tsindex bb5d5e4..a5730b7 100644--- a/apps/mobile/src/transfer/receive/utils/downloadHandlers.ts+++ b/apps/mobile/src/transfer/receive/utils/downloadHandlers.ts@@ -111,17 +111,17 @@ export async function handleDownloadedFile(if (!permission.granted) {return { intended: 'photos', destination: 'filesystem', localPath }}+ let created = truetry {await Asset.create(toFilePath(localPath))} catch (err) {+ created = falseconsole.warn('handleDownloadedFile: media library save failed', err)- const fallback = await saveToFiles(localPath, fileName)- return { ...fallback, intended: 'photos' }}try {const original = new File(localPath)- if (original.exists) original.delete()+ if (created && original.exists) original.delete()} catch (err) {console.warn('handleDownloadedFile: could not remove the private copy', err)}