' character replaced with _x27_

Last post 05-09-2010, 9:14 PM by cutechat. 2 replies.
Sort Posts: Previous Next
  •  05-08-2010, 4:37 AM 60830

    ' character replaced with _x27_

    Hi,
     
    Whenever I upload an image with an apostrophe (') in the file  name, it is replaced with _x27_ by the ajax uploader.
     
    why ? 
  •  05-08-2010, 11:03 AM 60834 in reply to 60830

    Re: ' character replaced with _x27_

    This symbol will cause some errors, we do not allow use it in file name. So we can add a warning to tell user do not use this symbol.   protected void
     
    Uploader1_FileUploaded(object sender, UploaderEventArgs args)
    {
          if (args.FileName.IndexOf("_x27_") > -1)
          {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "showerror", "<script>alert(' file name contains disable characters')</" +                  "script>");
                args.Delete();
          }
          else
          {  
                args.CopyTo("~/photo/" + args.FileName);
          }
    }
     
     
    Regards,
    Eric
  •  05-09-2010, 9:14 PM 60851 in reply to 60830

    Re: ' character replaced with _x27_

    Hi,
     
    Please download the last version and try again.
     
    Regards,
    Terry
View as RSS news feed in XML