Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Serverside Form Posting

Serverside Form Posting

Scheduled Pinned Locked Moved Web Development
htmlxmljsonhelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nic Rowan
    wrote on last edited by
    #1

    Ok, so I have this problem. We have this document management program (called Celum) that I need to upload a whole bunch of documents to. Celum provides an API but it's an html/XML interface and that's providing me with some difficulties. In order to upload a file I create an html web page as follows:

    <html>
    <head></head>
    <body>
    <form method="post" enctype="multipart/form-data" name="uploadForm"
    action ="http://[celumserver]/api/upload.api">
    Username: <br><input type="text" size="20" maxlength="20" name="username"><br>
    Password: <br><input type="password" size="20" maxlength="20" name="password"><br>
    TargetFolderID: <br><input type="imput" size="10" maxlength="10" name="folderId"><br>
    Choose a file: <br><input type="file" size="40" name="document"><br>
    <input type="submit" value="Upload">
    </form>
    </body>
    </html>

    And that works fine... for one file... with user intervention. Does anyone have any idea on how I can automate this? I've never done anythign along these lines and I'm stumped. One of the problems I have is the upload file gets attached as a file in an htmlfilecollection (because of the enctype="multipart/form-data") and I'm not 100% sure on how to do this programatically. At some point I'm also going to have to attach a second XML file with metadata but it should be the same idea as the first file. Thanks very much! Nick


    Dad always thought laughter was the best medicine, which I guess is why several of us died of tuberculosis. I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it.


    M 1 Reply Last reply
    0
    • N Nic Rowan

      Ok, so I have this problem. We have this document management program (called Celum) that I need to upload a whole bunch of documents to. Celum provides an API but it's an html/XML interface and that's providing me with some difficulties. In order to upload a file I create an html web page as follows:

      <html>
      <head></head>
      <body>
      <form method="post" enctype="multipart/form-data" name="uploadForm"
      action ="http://[celumserver]/api/upload.api">
      Username: <br><input type="text" size="20" maxlength="20" name="username"><br>
      Password: <br><input type="password" size="20" maxlength="20" name="password"><br>
      TargetFolderID: <br><input type="imput" size="10" maxlength="10" name="folderId"><br>
      Choose a file: <br><input type="file" size="40" name="document"><br>
      <input type="submit" value="Upload">
      </form>
      </body>
      </html>

      And that works fine... for one file... with user intervention. Does anyone have any idea on how I can automate this? I've never done anythign along these lines and I'm stumped. One of the problems I have is the upload file gets attached as a file in an htmlfilecollection (because of the enctype="multipart/form-data") and I'm not 100% sure on how to do this programatically. At some point I'm also going to have to attach a second XML file with metadata but it should be the same idea as the first file. Thanks very much! Nick


      Dad always thought laughter was the best medicine, which I guess is why several of us died of tuberculosis. I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it.


      M Offline
      M Offline
      Marc Firth
      wrote on last edited by
      #2

      so you want upload a whole load of users and files at once? I'd use a csv file to add the users, and file paths and upload the files separately.

      Neonlight

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups