SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    runat="server" Golgotha's Avatar
    Join Date
    Nov 2001
    Location
    Colorado
    Posts
    2,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ajax way of getting bitStream ?

    <input type="file" id="inputBrowse" />

    How do I use Ajax to send the bit stream to the server?

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think you can. It has to do with security that prevents js from accessing the local file system. The only thing js can access from a file type <input> is the filename.

    It seems like you should be able to relay the contents of the file to an XMLHttpRequest without accessing the file, but I am unaware of such a mechanism.

  3. #3
    SitePoint Guru SSJ's Avatar
    Join Date
    Jan 2007
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What exactly you want to do?
    Want to post a form and send only a file?

  4. #4
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only way I know of to upload a file without reloading the page is to put your <input type="file"> in a hidden iframe.


Bookmarks

Posting Permissions

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