Skip to content

Error: upload without files will crash #43

@yeatsYz

Description

@yeatsYz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions