react-native-background-upload icon indicating copy to clipboard operation
react-native-background-upload copied to clipboard

startUpload calls reject twice if copyAssetToFile fails

Open maxschmeling opened this issue 6 years ago • 0 comments

When attempting to startUpload with a assets-library file, if copyAssetToFile fails, reject is called two times.

It is first called in the copyAssetToFile completion handler: https://github.com/Vydia/react-native-background-upload/blob/a4f2fa45003fcf01bec75324aafd5ee472365b26/ios/VydiaRNFileUploader.m#L182

And then again in the catch after the continued attempt to upload directly from the assets-library path fails: https://github.com/Vydia/react-native-background-upload/blob/a4f2fa45003fcf01bec75324aafd5ee472365b26/ios/VydiaRNFileUploader.m#L216

maxschmeling avatar Aug 06 '19 19:08 maxschmeling