Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8741371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:18:04+00:00 2026-06-13T11:18:04+00:00

I think the solution to this is staring me in the face, but I

  • 0

I think the solution to this is staring me in the face, but I can’t seem to find it.

So, I’m making a site that has a small file upload section. The upload section will have a place to upload an image for different devices and device orientations (i.e. iPhone, iPad, portrait and landscape). I can easily figure out how to implement the drag & drop on the individual device icons, but if the user misses the drop area, the browser will just navigate to that image on their system. How do I disable drag & drop if there isn’t a file input type to receive the dragged file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:18:05+00:00Added an answer on June 13, 2026 at 11:18 am

    This document (documentation for a jQuery file upload plugin) shows how to disable the browser’s default action:
    https://github.com/blueimp/jQuery-File-Upload/wiki/Drop-zone-effects

    Quoting the document:

    If you want to allow specific drop zones but disable the default browser action for file drops on the document, add the following JavaScript code:

    $(document).bind('drop dragover', function (e) {
         e.preventDefault();
    });
    

    Note that preventing the default action for both the “drop” and “dragover” events is required to disable the default browser drop action.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I didn't find a solution for this but I think it should be doable.
This solution works, but I think it can much better be done JQuery: $('#addMessage').click(function
I can only think of a client-side solution using jQuery, but is it possible
This seems like a very simple question, but I think hours of staring at
I think I have a solution to this, but is there a better way,
I think this is an easy question, but I am not able to find
I've been staring at this for hours and unable to think of a solution;
I am aware that this topic has been covered already in many places, but
I've been looking around for a solution to this thing but I haven't found
I think I have been staring at this code too long and I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.