ASP Upload

Discussion in 'Classic ASP' started by robsecord, Sep 4, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I have recently tested the ASP Upload example found on the FAQ page for Classic ASP and it seems to work fine, in fact it uploads just fine. My only problem is that I want to save the filename into a database along with other user-entered information within the same form.

    Basically, I want to be able to get the FileName, FileSize, FilePath, TargetURL and other info like Description and Title supplied by the user. How do I get this in one form?

    Can someone please help me?

    R. Secord, B.Sc., CTO MorphixTech
     
  2. I think the problem is the encyption type on the form. I have a page that does sort of what you want and I got around this by having a javascript fire off before the form is submitted that changes the action event to include the filename variable. Something like this:
    <script Language="JavaScript">
    <!--
    function Form1_Validator(theForm)
    {
    var vfile=theForm.vfile.value;
    theForm.action="UploadScript1.asp?vfile=" + v1;
    return (true);
    }
    //--></script>

    Of course you need to add this to formtag:
    onsubmit="return Form1_Validator(this)"
     
  3. quote:Originally posted by theharmonyguy

    Maybe this will help:
    http://www.aspupload.com/manual_simple.html
    </blockquote id="quote"></font id="quote">

    Thanks TheHarmonyGuy, but it didn't help. I don't want to use a seperate program just to upload, and DiscountASP.net provides an Upload Object Already. The only problem is when I upload using the one DiscountASP.net provides, I cannot read the Filename, Filetype, Size, or even the other values passed through Hidden Input tags.

    Basically, I want to store an Image on the server through the upload page, and then add the filename to an Access Database.

    Any help would be greatly appreciated.


    R. Secord, B.Sc., CTO MorphixTech
     
  4. Thanks Duane, you are AMAZING!

    That way works very well, I wish I had thought of it earlier!

    This has helped me so much!! I thought I was in trouble!! [:0]

    Thanks a million!! [:D]

    R. Secord, B.Sc., CTO MorphixTech
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page