Skip to main content
Known Participant
April 12, 2008
Question

File Uploads CF8

  • April 12, 2008
  • 3 replies
  • 646 views
Anyone have ideas on how to pre-populate the File Field in a CF enctype/multipart-data form. I know where the file will be stored on the client computer and what it's name is and want to bypass the step of having to "Browse" for it but have been unable to post the known path and file name to the File Field

I use an Activex control to scan and save a PDF file on the client computer and want to go immediately to Upload the file and bypass the "browsing" part as it is confusing to many inexperienced users. I have the information about the file name and where it will be stored on the client computer as that is a variable I set in the Activex control.

Thanks

Ted Daniels
    This topic has been closed for replies.

    3 replies

    Inspiring
    April 24, 2008
    Hopefully you are not planning on the public using this site, since ActiveX only runs in MSIE browsers, and in many cases home users will have their security set so ActiveX will not run (or will at least keep prompting them to run it).

    The security mechanism is there for a reason. You merely have to make the application intuitive and have proper and easy to follow instrcutions fo rthe end-user.

    If you are doing this for a closed target audience, then use the ActiveX, but make sure you code the page so only MSIE users can access it.

    Known Participant
    April 21, 2008
    Depending on how good you are with API's and ActiveX you could use window handles to directly reference the browse form field and populate the field, however your activeX control would have to do this. I have'nt tried to make an activeX control do this myself, so the "signed" control issue that CfSearching mentioned might pop up.
    Known Participant
    April 24, 2008
    Thanks. Slowly getting there. I am using a neat scan from web page Activex control from Dynamsoft - www.dynamsoft.com - to achieve the objective.
    Inspiring
    April 19, 2008
    Pre-populating file fields is disallowed as a browser security mechanism. This is to prevent malicious sites from uploading file information from your computer without authorization. IIRC you must use a "signed" control (activeX, applet, etcetera) to access file system information.
    Known Participant
    April 24, 2008
    Thanks. Finally figured this out. Am trying an Activex Control from Dynamsoft to get around this problem. I am using their web page based scan activex control - www.dynamsoft.com