FileName's problem (WHY???????)

Last post 11-19-2008, 12:45 AM by winlj. 2 replies.
Sort Posts: Previous Next
  •  11-17-2008, 12:37 AM 45814

    FileName's problem (WHY???????)

    old filename is sunset.jpg
    uploaded filename is persisted.46758c92-242d-80c1-5fd6-d3a2f1f65ea1.SunSet.jpg.resx
     
    Why???????
     
    I need old filename.
     
    postfix is ".resx"  ????? Why?    
     
    Thank you very mach.....
  •  11-17-2008, 4:35 AM 45833 in reply to 45814

    Re: FileName's problem (WHY???????)

    Hi,
     
    That is a temporary file path that store the uploading data.
     
    AjaxUploader use ".resx" to prevent the file be downloaded or executed without explicit permission.
     
    You need move/copy the temporary file to your own folder in the FileUploaded event.
     
    private void Uploader1_FileUploaded(object sender, UploaderEventArgs args)
    {
          string folder=Server.MapPath("~/UploadFiles/");
          string mypath=Path.Combine(folder,args.FileName);
          args.MoveTo(mypath);
    }
     
    Regards,
    Terry
  •  11-19-2008, 12:45 AM 45928 in reply to 45833

    Re: FileName's problem (WHY???????)

    Thanks
     
     
    Problem ---------- Game Over!!!~~~
View as RSS news feed in XML