react-native-fs icon indicating copy to clipboard operation
react-native-fs copied to clipboard

copyAssetsFileIOS not working for gifs

Open JohnBerd opened this issue 4 years ago • 5 comments

steps to reproduce

// item is a GIF image picked from IOS camera roll
const destination = `${RNFS.TemporaryDirectoryPath}${item.filename}`

let absolutePath = await RNFS.copyAssetsFileIOS(item.uri, destination, 0, 0)
 
// by checking directly in the destination, we find that the GIF has been converted into PNG

JohnBerd avatar Dec 23 '21 18:12 JohnBerd

Hi @JohnBerd, I am also getting the same error, do you have any solution for this part?

Sotatek-DungNguyen7 avatar Mar 28 '22 03:03 Sotatek-DungNguyen7

Hi @Sotatek-DungNguyen7, I looked at the source code and only jpegs and pngs can be copied.

I had to install the expo modules and to use expo filesystem instead of this package.

JohnBerd avatar Mar 28 '22 09:03 JohnBerd

Any other alternative packages

archon21 avatar Dec 16 '22 18:12 archon21

Same issue for me any solution's?

KartvyaAcharya avatar Jan 25 '24 12:01 KartvyaAcharya

You may be view this solution: https://github.com/Sotatek-DungNguyen7/react-native-fs/commit/5ba89c6ac3c3e44107732204867d353447617c47

Sotatek-DungNguyen7 avatar Jan 26 '24 02:01 Sotatek-DungNguyen7