1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

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

This commit is contained in:
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

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,