Android: Fix pasting PNG and JPEG images from the clipboard (#10777)

pull/10787/head
Henry Heino 2024-07-26 04:37:55 -07:00 committed by GitHub
parent 8c0769fdb3
commit 77b74daa0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,10 @@ import { Size } from '@joplin/utils/types';
import { Image as NativeImage } from 'react-native';
const getImageDimensions = async (uri: string): Promise<Size> => {
if (uri.startsWith('/')) {
uri = `file://${uri}`;
}
return new Promise((resolve, reject) => {
NativeImage.getSize(
uri,