question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

isDragReject true for accepted file extension

See original GitHub issue

I have seen this work appropriately when setting the MIME type but has not been working when setting the file extension. I want to set a more specific extension, but for the sake of the bug I have been seeing .png being rejected when choosing to accept .png files. The hidden input is working as expected, but the hover and subsequent event is not working as expected.

React dev tools showing current accept: screen shot 2016-05-10 at 4 45 54 pm

Screenshot of rejection: drag-reject

I apologize if I’ve missed something. I’m looking back at your attr-accept project to trace it back.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:24

github_iconTop GitHub Comments

4reactions
caravincicommented, Apr 13, 2021

This however doesn’t fix the problem for files with unspecified MIME types. Any hints on how to handle that case?

image

Any chance this issue can be reopened, so no new ones need be created?

2reactions
ArtemBernatskyycommented, Jan 23, 2019

@lruckman thx, for those coming here from Google try this accept=".csv,text/csv"

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-dropzone: isDragReject is true when accept csv?
When dragging a csv file, this code logs "true, false, true". But react-dropzone accepted the csv file. I tried with images and all...
Read more >
Accepting specific file types - react-dropzone
The value must be an object with a common MIME type as keys and an array of file extensions as values (similar to...
Read more >
react-dropzone
Files are accepted or rejected based on the accept , multiple , minSize and maxSize props. accept must be a valid MIME type...
Read more >
React Dropzone and File Uploads in React - Upmostly
{isDragReject && "File type not accepted, sorry! ... In a real world file uploader, you wouldn't want one of your users dragging in...
Read more >
Use React Dropzone to Create a Drag-n-Drop Zone for Files
isDragRegect — boolean, true if a file is dragged over the dropzone area and not included in acceptable file types. Create the dropzone ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found