#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    2
    Rep Power
    0

    HTTP POST from camera to ASP script.


    Thank you for having a look...


    We have a Canon VB-C60 IP cam that I would like to have post a snapshot every x seconds. I was using the FTP method but I would like to use the HTTP POST instead to also trigger a further script to process and manage the images. Normally on a POST, a file is sent with the <input type="file" ...> tag. This camera however does it a little differently.

    From the camera spec sheet....

    When “Image attached Notification with HTTP” is selected
    A message is set in the following format:

    POST {URI’s setting value}?{parameter’s setting value} HTTP/1.1
    ...
    User-Agent: Canon Network Camera VB/4.0¥r¥n
    Content-Type: image/jpeg¥r¥n
    Content-Length: {JPEG image data length}¥r¥n
    ¥r¥n
    {raw JPEG data}


    The settings on the camera allow me to put anything in the place of {parameter’s setting value} but I don't believe I need this in my scenario. It's just the matter of the ASP script properly processing the above POST format in order to save the file intact.

    I am trying to use the script by Lewis E. Moten III found at planet-source-code dot com. Search for "Upload Files Without COM v2"

    I got it to work with the built-in form but will not handle the output from the camera. Can the ASP script be modified to accept this POST format?

    Again, thank you!!
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,445
    Rep Power
    4539
    There is no built-in asp upload, at least not classic asp which I assume you're using since you posted here and not in the NET forum.

    There are some available asp upload scripts, google should turn up plenty, otherwise you need an upload com object on your server that can be used from asp. If you need to get other post parameters as well as the uploaded file, an upload com object will probably make it easier to accomplish.

    In general you will need a directory on the server to hold the uploads, and that directory must allow write permissions for any user that IIS may be impersonating.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    2
    Rep Power
    0
    Originally Posted by Doug G
    There is no built-in asp upload, at least not classic asp which I assume you're using since you posted here and not in the NET forum.

    There are some available asp upload scripts, google should turn up plenty, otherwise you need an upload com object on your server that can be used from asp. If you need to get other post parameters as well as the uploaded file, an upload com object will probably make it easier to accomplish.

    In general you will need a directory on the server to hold the uploads, and that directory must allow write permissions for any user that IIS may be impersonating.
    -Yes, classic ASP.
    -Upload folder established with correct & tested permissions .
    -It is understood that I require a script to handle the transfer.
    -Server is IIS on Win 7 Pro with max upload size set to 8000 (plenty to handle the files we are working with.

    I am looking for how to modify the above mentioned script to accommodate the camera's HTTP POST method.

IMN logo majestic logo threadwatch logo seochat tools logo