how to obtain complete filename

Last post 01-07-2009, 1:46 PM by cutechat. 1 replies.
Sort Posts: Previous Next
  •  01-07-2009, 11:44 AM 47520

    how to obtain complete filename

    hi,
     
    i am using persisted upload method of uploader for file uploading.
     
    the file is initially stored with .resx extensions.
     
    eg: 123.mov is stored as persisted4232d1cd0-adab.........123.mov.resx
     
    i want to store the complete filename (persisted4232d1cd0-adab.........123.mov.resx) in the database.
     
    so how can i obtain the complete filename (persisted4232d1cd0-adab.........123.mov.resx).
     
     
    Thanks.
     
     
     
  •  01-07-2009, 1:46 PM 47527 in reply to 47520

    Re: how to obtain complete filename

    Hi,
     
    In the file upload event args , or other upload file object, you can use
     
    args.FileName to get the origin filename.
     
    and use the
     
    args.GetTempFilePath() to get the full path of the temp file in file system.
     
    use Path.GetFileName(args.GetTempFilePath()) to get the filename without directory.
     
    I suggest you move/copy the temp file to your own folder, because the files in the temp folder would be deleted when the uploader maintain it.
     
    Regards,
    Terry
View as RSS news feed in XML