wubocong / react-upload-file

react upload component
MIT License
28 stars 25 forks source link

Component does not work #2

Open christophedebatz opened 7 years ago

christophedebatz commented 7 years ago

Hi everybody,

Thank's for this component but at home it does not work.

Indeed, the props.options are not overidded at all.

I make it worked, I just replaces the block by this one:

const options = _.defaults(props.options, { dataType: 'json', timeout: 0, numberLimit: 0, userAgent: window.navigator.userAgent, multiple: false, withCredentials: false, beforeChoose: emptyFunction, didChoose: emptyFunction, beforeUpload: emptyFunction, didUpload: emptyFunction, uploading: emptyFunction, uploadSuccess: emptyFunction, uploadError: emptyFunction, uploadFail: emptyFunction, onAbort: emptyFunction });

With lodash:

import _ from 'lodash';

wubocong commented 7 years ago

@christophedebatz Brilliant! Would you mind making a PR?

Moejoe90 commented 7 years ago

If the problem was fixed why is the issue not closed?

christophedebatz commented 6 years ago

@wubocong Wow I've just discover the principle of GitHub notifications (at the top right corner), so I'd just see that you replied to my old comment ;) sorry for the PR dudes. Have a nice coding!

ImenTurki commented 6 years ago

doesnt work also ,

index.js:29900 Uncaught TypeError: Cannot read property 'target' of undefined

'file' is not defined no-undef 'user' is not defined no-undef 'mill' is not defined no-undef