File upload problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nelluru
    New Member
    • Mar 2007
    • 31

    File upload problem

    hi all,
    My problem is that I want to upload a file without asking the user to select the file as I know the location of the file on the users machine.

    The whole process goes like this,
    User will invoke scanner from javascript and when the scanning was done
    user will get an Upload button, when user clicks on that upload button the file should be uploaded to the server.

    Able to invoke scanner and also saving file was done on clients machine but, not able to do file upload automatically.
    Is there any way to do it????

    regards
    Nelluru
  • rnd me
    Recognized Expert Contributor
    • Jun 2007
    • 427

    #2
    no. wont work. user must select a file, or value is not submitted as a security precaution.

    Comment

    • Nelluru
      New Member
      • Mar 2007
      • 31

      #3
      Originally posted by rnd me
      no. wont work. user must select a file, or value is not submitted as a security precaution.
      there is a way to upload files in Firefox.

      I am able to upload text files, but not able to upload binary files like images

      Is there any way to read binary files in javascript??

      regards
      Nelluru

      Comment

      • rnd me
        Recognized Expert Contributor
        • Jun 2007
        • 427

        #4
        you can simply read the data of a file input in firefox, no about:config hacking and xpconnect involved. every file input has a files property, an array of files. each value has a toDataURL method, as well as getAsBinary().

        Comment

        • Nelluru
          New Member
          • Mar 2007
          • 31

          #5
          Originally posted by rnd me
          you can simply read the data of a file input in firefox, no about:config hacking and xpconnect involved. every file input has a files property, an array of files. each value has a toDataURL method, as well as getAsBinary().
          Sorry Forgot to mention that I have to read binary files for Internet Explorer not for Firefox

          Comment

          Working...