weixiyen / jquery-filedrop

jQuery plugin - drag and drop desktop files and POST to a URL to handle files.
958 stars 285 forks source link

jQuery(...).filedrop is not a function with jQuery 3.1.1 #185

Open jmchauv opened 7 years ago

jmchauv commented 7 years ago

Is there a fix for this? I am upgrading from jQuery 1.7.2 to 3.1.1 and am receiving this error:

jQuery(...).filedrop is not a function

Dolgovec commented 7 years ago

Found that problem too. The solution is: 1) remove jQuery.event.props.push("dataTransfer"); 2) change e.dataTransfer to e.originalEvent.dataTransfer

good luck

upd: fixed in new file version already (v. is still 0.1.0)

rickdatel commented 6 years ago

I am having the same issue with jQuery 3.2.1 have tried to the fix above but its causing other

mvpkenlin commented 6 years ago

I am also having the same issue with JQuery 3.2.1. Tried the above fix, but now it generate another error "Syntax error, unrecognized expression: #"

ShawnJ013 commented 6 years ago

Hello I've tried this fix above as well, does any one have an update, I've been searching for a couple hours now, I'm working on a MVC 5, jquery-3.3.1 project, and I like the FileDrop.js function for its simplicity.

alexd612 commented 6 years ago

Using JQuery 3.3.1 and tried the fix above and get

"Syntax error, unrecognized expression: #"

Any ideas?

carlblanchard commented 6 years ago

Add this reference then all will become good in the world.... <script src="https://code.jquery.com/jquery-migrate-3.0.1.js"></script>

allac00 commented 5 years ago

im also facing this issue. The solution "* remove jQuery.event.props.push("dataTransfer");

also gives the next error: "Syntax error, unrecognized expression: #".

Adding the reference to jquery-migrate doesnt solve it either.

Please advise.

alexd612 commented 5 years ago

Hey i think i ended up just using a file browse button. I could never get the drop box working properly.

On Wed, Feb 13, 2019, 7:26 AM allac00 <notifications@github.com wrote:

im also facing this issue. The solution "* remove jQuery.event.props.push("dataTransfer");

  • change e.dataTransfer to e.originalEvent.dataTransfer"

also gives the next error: "Syntax error, unrecognized expression: #".

Adding the reference to jquery-migrate doesnt solve it either.

Please advise.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/weixiyen/jquery-filedrop/issues/185#issuecomment-463180753, or mute the thread https://github.com/notifications/unsubscribe-auth/ApNcxnS0KXGCHaNdgV5ZqSD5hCVvscyHks5vNARcgaJpZM4Lkw-6 .

joshuafredrickson commented 5 years ago

186 fixes this issue if you're in a pinch.

Nailuj2000 commented 4 years ago

Hi, i have made a fork and submit a pull request with solution to this error. The error is when opt fallback_id is not set, then in filedrop.js the line 100 fail because $('#') is not a valid identifier Solutions is move these block into " if ( opts.fallback_dropzoneClick === true )" or setting the option 'fallback_id' to any existing element or simply check if fallback_id is set

:)