The way to upload images to a standalone image server via FCKeditor-Web editor

Source: Internet
Author: User

I thought about it. There are several ways to solve this problem:
1. Open FTP on the picture server, add the picture address to the person, but inconvenient, especially in the visual editor to see more than one operation.
2. Open FTP on picture server, and improve IIS to perform Dosshell access FTP, but not secure.
3. In the picture server open Iis,web background direct access (or there is a problem in the editor is not convenient to view, but you can use JS control upload automatically appended to the HTML editing window)
4. Use the existing online editor upload program to achieve.
Third, four methods are more reliable, but also need to solve the problem of Cross-domain, the third also have to write a separate program, the changes are relatively large, with the fourth most ideal.
So how can it be achieved? I used to use the background editor is Dvbbs background editor, this time I switch to FCKeditor, but I am not very familiar with, after a day, finally tested successfully. The method is as follows:
1. In Picture Server (img.jb51.net) and background server (gl.cdbs.com.cn). FCKeditor is installed on. (In fact, only fckeditor.asp is required on gl.cdbs.com.cn, because ASP cannot include extranet files)
2. Set up sbasepath=http://img1.cdbs.com.cn/fckeditor/in the background program before creating an editor. You can call the editor of the picture server directly.

Copy Code code as follows:

<%
Dim Sbasepath
Sbasepath= "http://img.jb51.net/fckeditor/"
Dim Ofckeditor
Set ofckeditor = New FCKeditor
Ofckeditor.basepath = Sbasepath
Ofckeditor.config ("skinpath") = Sbasepath + "editor/skins/silver/" Set skin
' Ofckeditor.width= 80% '
ofckeditor.height= "400px"
Ofckeditor.value = ""
Ofckeditor.create "FCKeditor1"
%>

3. Major changes to the "Img.jb51.net/fckeidtor/fckconfig.js" document
Copy Code code as follows:

var _filebrowserlanguage = ' asp '; ASP | aspx | CFM | Lasso | Perl | php | Py
var _quickuploadlanguage = ' asp '; ASP | aspx | CFM | Lasso | Perl | php | Py

4. Modify the "img.jb51.net/fckeditor/editor/filemanager/connectors/asp/config.asp" configuration file,
Configisenabled = True ' first to open the configuration.
5. Resolve Cross-domain access. However, you can set "document.domain= ' cdbs.com.cn ';" To solve. The domain name completely different also has the corresponding method,
6. There is also a need to address security issues, which can be judged by cross-station cookies for permission to upload (pending completion).
Finally realized, in the background editor upload pictures to the corresponding image server, the image address is the relative address, we can save the current group of picture server to distinguish. For example, "news release" modules such as, but for other modules such as: Picture Display module, music album module, etc. There are multiple media files under a heading, so it is still necessary to write a separate program to complete it. So how did it happen?

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.