itinance / react-native-fs

Native filesystem access for react-native
MIT License
4.89k stars 954 forks source link

fix: add jobId condition inside upload event #1226

Open olehkykush opened 3 months ago

olehkykush commented 3 months ago

Hi, many thanks for this project!

Problem that I encountered: When I called multiple RNFS.uploadFiles progress callbacks fire events for every upload started, not only event that related to that upload only.

If two uploads were started with jobId 1 and 2 - In progress callback I'll receive responses of jobId 1 and 2.

This patch is based on existing solution with RNFS.downloadFile progress callbacks and it helped me with this problem.