Duplicate file name bug

  •  12-28-2011, 6:55 AM

    Duplicate file name bug

    Hi there,
     
    I have a question similar to http://cutesoft.net/forums/thread/71622.aspx
     
    The following:
     
    I need to store the location of an uploaded file in a database. I access the FileName property of the uploaded file as such:
     
    1. Dim mvcfile      
    2. Set mvcfile=uploader.GetUploadedFile(Request.Form("uploader"))     
    3. Response.Write mvcfile.FileName  
     The problem with this is however that this property contains the original name of the file, and not the name of the file after is has been persisted to the location as set in the SaveDirectory property. No problem in case of unique uploads.
     
    However, in case of a duplicate upload the file in the SaveDirectory location gets renamed by the component. A timestamp is appended to the file name. The FileName property still contains the original name though.
     
    Obviously I need the name of the persisted file. How can I access this?
     
    Thanks and regards,
    Nico 
     
     
View Complete Thread