Код: Выделить всё
export const downloadImage = async (imageUrl: string): Promise => {
const { fileName, type } = getFileNameFromUrl(imageUrl);
const { fs } = RNFetchBlob;
const downloadDest = `${fs.dirs.DownloadDir}/${fileName}`;
if (Platform.OS === 'android') {
if (Platform.Version {
ToastComponent.Success(
'Download Successful',
'Image has been downloaded successfully',
);
})
.catch(err => {
ToastComponent.Error('Download Failed', err.message);
});
};
"expo": "~51.0.39",
"react-native": "0.74.5 ",
"rn-fetch-blob": "^0.12.0",
Заранее спасибо
Подробнее здесь: https://stackoverflow.com/questions/791 ... n-emulator
Мобильная версия