Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2003
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to select multiple files for upload by drag-n-drop

    Hi.
    I'm facing a big problem. Being lazy.
    I'm working on a website which has a server side upload script that will handle as many file uploads as I ask it to. The big problem is that I dont want to click 100 times on the "browse" button of the File inputs to upload 100 diferent files.

    I have no problem with writing 100, or any other ammount, of file inputs on-the-fly with javascript. What I want to acomplish is something like :

    - selecting the files from (windows) Explorer
    - drag-n-drop them to IE
    - have the browser know the file names and paths <- most important part, and the only one I need.
    - write all the file inputs on-the-fly.

    I am asking this here because I saw (long long ago) a javascript that actually opened hard drive information, but have been unable to find information about this anywhere nowadays. It can be javascript or jscript, as IE is the target browser of the whole site.

    If what I am seeking is impossible to do with the language, just delete this thread and please drop me and email saying it is impossible =) Thank you.

  • #2
    New Coder
    Join Date
    Feb 2003
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, I found out that what I wanted could be done through ActiveX + Jscript. Now I face another problem, which I think I already have the answer to, but would like to know from others anyway.

    Is it possible to create a <input type=file> tag with a predefined value? like <input type=file value="c:\\windows\\win.ini">? I've tried writing it on the document like that, and writing first the tag and then setting its value programatically. None worked and I'm starting to think it's impossible (on IE at least).

    Anyone got any word on this? Thx for at least looking at the post =).


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •