Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invariant Violation: Upload end point must be provided to upload files #7

Open
sivamca19 opened this issue Nov 10, 2016 · 4 comments
Open

Comments

@sivamca19
Copy link

I have used only Receiver like below
<Receiver
customClass={"classname"}
isOpen={true}
onDragEnter={() => this.onFileEvent('enter')}
onDragOver={() => this.onFileEvent('over')}
onDragLeave={() => this.onFileEvent('leave')}
onFileDrop={this.onFileDrop}
>


Drag and Drop a file here to start the upload

but it is throwing me a error in safari like below
Invariant Violation: Upload end point must be provided to upload files
Kindly help me...

@harshinim
Copy link

I had the same issue and I had to work around the issue by doing this

window.DragEvent='dummy';

@sivamca19
Copy link
Author

@harshinim thanks :)

@lionng429
Copy link
Owner

@harshinim @sivamca19 may I know if the solution properly addressed the issue? I have no idea why window.DragEvent would matter.

@harshinim
Copy link

Yes it did, not really sure why though?? I went into the code and I saw that the code had this check

invariant(
!!window.DragEvent && !!window.DataTransfer,
'Upload end point must be provided to upload files'
);

Although window.DragEvent was assigned a dummy value , the code still worked without any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants