How to access actual uploaded file when using TempDirectory?

Last post 04-12-2010, 1:07 AM by Kal. 4 replies.
Sort Posts: Previous Next
  •  04-10-2010, 12:06 PM 59990

    How to access actual uploaded file when using TempDirectory?

    I never worked with "resx" files. If I use the tempDirectory to upload the users files, how can I access the actual uploaded file and its actual name from the rexs file. For example, to move, attach to an email...etc?
     
    If you could help, it would be greatly appretiated.
     
    Thanks
    Kal 
  •  04-11-2010, 8:58 PM 59998 in reply to 59990

    Re: How to access actual uploaded file when using TempDirectory?

    Kal
     
    after you use the GetUploadedFile to get a file object,
     
    you can use FileGuid to get the xxxxxx-xxxx-xxxxxxx number string
     
    use FileName the get the original name of the file
     
    and use FilePath to get full path of the temp resx file.
     
    Regards,
    Terry
     
  •  04-11-2010, 11:15 PM 60000 in reply to 59998

    Re: How to access actual uploaded file when using TempDirectory?

    Thanks :)
    Any chance you could share with me a quick code sample for each step? 
     
    Thanks
    Kal 
  •  04-12-2010, 12:58 AM 60001 in reply to 59998

    Re: How to access actual uploaded file when using TempDirectory?

    Ok, this is what I did:
     
    Dim mvcfile   
    Set mvcfile = uploader.GetUploadedFile(Request.Form("storiesUpLoader")) 
    Response.Write("file name: " & mvcfile.FileName) 
    Response.Write("<br />file guid: " & mvcfile.FileGuid)   
    Response.Write("<br />file path: " & mvcfile.FilePath)  

    I was able to get all the info. I am still not sure how I could get or extract the actual uploaded file from the resource file (example: file.jpg), but maybe thats something I have to figure out on my own, and has nothing to do with your uploader.
     
    Thanks
    Kal 
                                                        
                                              
  •  04-12-2010, 1:07 AM 60002 in reply to 59998

    Re: How to access actual uploaded file when using TempDirectory?

    Never mind, I figured it out. Sorry first time working with resx files. Now I know :)
    Everything is working great. Thanks :) 
View as RSS news feed in XML