简体   繁体   中英

How to make CkFinder generate HTTP URLs for uploaded file when using FTP backend FileSystem in CkFinder 3 ASP.NET

I am using CkFinder 3 ASP.NET with FTP backend file system Nuget package CKSource.FileSystem.Ftp . CkFinder is integrated with CkEditor to upload the files in the website content.

The FTP connector works and I am able to browse and upload files, but I have a problem with the URL's that are being generated. When I select a file in CkFinder, the following URL proxy is generated: http://domain/path/to/ckfinder/connector?command=Proxy&lang=en&type=Images&currentFolder=%2F&hash=ea8d60299e82343398f8ef2451c2b22b3c8cc8c6&fileName=img0_1024x768.jpg

I tried settings useProxyCommand="false" for the FTP back-end, but after I did that, the URL is not being generated at all. After selecting the file in the Browse Server dialog, the URL text box stays empty.

My FTP is backed with a HTTP server so every file on the ftp has a corresponding HTTP URL. I need to generate a proper http:// URL for the file selected in the Server Browser (CkFinder) window.

I also tried to set a baseUrl parameter for the FTP backend specifying the base URL as a value, but it did not help.

How do I set up CkFinder FTP backend so that the file selected in Browse Server dialog is translated into an HTTP url that points directly to the file, without using proxy?

I believe the problem you are reporting is known and has already been fixed - https://github.com/cksource/ckfinder-connector-net/issues/161 .

Within few days a new CKFinder version for ASP.NET, which is free of this issue, should be released.

Edit: From what I can see CKFinder 3.4.2 for ASP.NET has just been released. You should be able to use FTP backend baseURL to set HTTP URLs for uploaded images.

The problem was within CkFinder itself. CkSource released an update 3.4.2 and now the problem is fixed.

The following configuration option is required for FTP back-end to translate ftp url into http: <option name="baseUrl" value="http://example.com/folder/subfolder/" />

I have also set the useProxyCommand to false :

<backend name="default" adapter="ftp" useProxyCommand="false">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM