Expand my Community achievements bar.

How to import photo to Lightroom in React Native

Avatar

Level 1

My problem is When I download dng file from server, It will automatically import lightroom mobile but I can't do it. I use some method to download image. RN-fetch-blob. Please help me about this.

 

sample code:

 

const configOptions = Platform.select({
ios: { fileCache: true, path: fPath, appendExt: ext, },
android: { 
fileCache: false,
 appendExt: ext,
 addAndroidDownloads: { 
useDownloadManager: true,
 notification: true,
 path: aPath + '/' + file_ex,
 description: 'Image'}} 

RN-FetchBlob.config(configOptions) 
.fetch('GET', imageUrl) 
.progress((received, total) => { console.warn('progress', received / total); }) .then((res) => { console.warn('file_downloaded', res); RNFetchBlob.android.actionViewIntent(res.path()); }) 
.catch((errorMessage, statusCode) => { console.warn('error with downloading file', errorMessage); });

  
0 Replies