Drag a file from Desktop and Drop into Browser File Element

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sirisha

    Drag a file from Desktop and Drop into Browser File Element

    Hi ...
    Is it possible to drag a file from Client Desktop into the
    Browser Form File Element(input type='file') instead of File Browse?
    I know that, File drag is possible in the Mozilla Firefox
    Browser by adding ADD-ON "DragDropUpload ".But I want to implement this
    functionality using the JavaScript/Ajax Code in PHP Application and it
    should be compatible to all the Browsers in PC and iPhone and Windows
    Phone.
    Please, let me know your valuable suggestions and help to solve my
    problem.

    Thanks in Advance,
    Sireesha.
    (PHP Programmer).
  • Joost Diepenmaat

    #2
    Re: Drag a file from Desktop and Drop into Browser File Element

    Sirisha <revu.sirisha@g mail.comwrites:
    Hi ...
    Is it possible to drag a file from Client Desktop into the
    Browser Form File Element(input type='file') instead of File Browse?
    I know that, File drag is possible in the Mozilla Firefox
    Browser by adding ADD-ON "DragDropUpload ".But I want to implement this
    functionality using the JavaScript/Ajax Code in PHP Application and it
    should be compatible to all the Browsers in PC and iPhone and Windows
    Phone.
    Please, let me know your valuable suggestions and help to solve my
    problem.
    Again: the file element has very limited styling and scripting
    possibilities because of *serious* security implications. In other
    words: drag & drop on a file element is either suppported by whatever
    browser the visitor is using, or not. There is nothing you can do in
    client-side javascript to change that, so don't even try.

    --
    Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/

    Comment

    • kadkaz@gmail.com

      #3
      Re: Drag a file from Desktop and Drop into Browser File Element

      It is can be done.
      For IE explorer it is easy but code that i found does not work yet.
      For FireFox the code is worked.
      See http://straxus.javadevelopersjournal...d_script_p.htm

      It is not necessarily to get the file. It is necessarily to get the
      path and then you can got it through Ajax if you want.

      Comment

      • Joost Diepenmaat

        #4
        Re: Drag a file from Desktop and Drop into Browser File Element

        kadkaz@gmail.co m writes:
        It is can be done.
        For IE explorer it is easy but code that i found does not work yet.
        For FireFox the code is worked.
        See http://straxus.javadevelopersjournal...d_script_p.htm
        >
        It is not necessarily to get the file. It is necessarily to get the
        path and then you can got it through Ajax if you want.
        If I read that correctly, you basically have to grant the web page
        permission to read and upload *any* file on your file system. I
        wouldn't grant that permission to any site that I don't control
        myself.

        --
        Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/

        Comment

        Working...