react-native-fileupload
react-native-fileupload copied to clipboard
Error: upload without files will crash
var obj = { uploadUrl: options.uploadUrl, method: 'POST', headers: {}, fields: {}, files: [] }; NativeModules.FileUpload.upload(obj, function(err, result) { if (result && result.data === 'ok') { handleRight() } else { handleError(); } });
in FileUploadModule.java/upload fileInputStream.close(); this line will crash as i pass an empty files array, I think maybe here should have a judge if files array is empty