Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

244
Views
How to know if the user is dropping the file on the defined location?

On this application, the user can drag and drop a file on the specified location. Let say here:

<div id="dropZone" style="width: 200px; height: 100px;"></div>

However, we noticed that no matter where the file is drop, the webpage will process it. Here is an example taken online https://jsfiddle.net/oL2akhtz/. There is a place to drop the file, but no matter where you leave it, it will stay. How to know if the user is droping the file in the right place? Or how do you disable the cursor if the user is not droping the file where it should be?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

it actually only works on the dropzone because it has full width and height. and the drag is set to window, when a user drags over the window, the div will be visible but will not receive any files

to fix it

  1. Optimize the height and width:
div#dropZone {
  background: gray;
  position: fixed;
  top: 0;
  left: 0;
  width: 30%;
  height: 30%;
  z-index: 999;
  opacity: 0.6;
  visibility: hidden;
}
  1. I'm not sure, but if you tried to fix it by allowing and denying the user from dropping it outside the drag area, delete the functionality because it's useless.
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!