refactor(mobile): extract shared MIME type utility and improve error handling

- Extract EXT_TO_MIME map and mimeTypeFromFilename to shared module
  at mobile/src/utils/mimeTypes.ts (used by _layout.tsx and +not-found.tsx)
- Add error logging to ensureLocalUri catch block for debugging
- Add error handling to Linking.openURL calls in ProfileScreen
- Fix incorrect LSSupportsOpeningDocumentsInPlace docs in audit report

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-19 12:05:47 +00:00
parent f549505bfd
commit cfe83d7efa
6 changed files with 59 additions and 81 deletions
+2 -1
View File
@@ -95,8 +95,9 @@ export default function UploadScreen() {
try {
await FileSystem.copyAsync({ from: uri, to: destUri });
return destUri;
} catch {
} catch (copyErr) {
// Copy failed – fall back to the original URI (might work for some paths).
console.warn("[ensureLocalUri] copyAsync failed:", { from: uri, to: destUri, error: copyErr });
return uri;
}
}, []);