Ueditor Editor cannot upload picture problem Resolution _ Web page Editor

Source: Internet
Author: User

Ueditor is the Baidu editor, in the local IIS environment can upload pictures, but placed in the server's IIS environment could not upload pictures, after the search found that IIS setup issues, the main reason for this problem is that most virtual hosts do not give IIS Anonymous account access to the disk's non-user directory, There is no permission to read, since we cannot resolve the IIS issue only from the code set, as follows.

Upload the picture, you can use the browser's own debugging tools to view the error, you can see an "Access denied or the file already exists" errors. Careful debugging analysis, finally found the problem.

In its upload.class.asp, like the next function:

Private Function Checkorcreatepath (ByVal path)
    Set fs = Server.CreateObject ("Scripting.FileSystemObject")
    Dim parts
    parts = Split (path, "\")
    Path = "For each part,
    parts
      Path = path + part +" \ "
      If fs.f Olderexists (path) = False Then
        fs. CreateFolder (path) end
      If
    Next
  Function

Modify it as follows:

Private Function Checkorcreatepath (ByVal path)
    Set fs = Server.CreateObject ("Scripting.FileSystemObject")
    Dim Parts
		Dim Root:root = Server.MapPath ("/") & "\"
    ' parts = Split (path, "\")
		parts = Split (Replace p Ath, Root, ""), "\" "
    Path =" "Path = root for each part in
    parts
      Path = path + part +" \ "
      If fs. FolderExists (path) = False Then
        fs. CreateFolder (path) end
      If
    Next
  Function

The problem of uploading can be solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.