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:
@@ -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;
|
||||
}
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user