I am getting an HTTP 404 error when I click on the View function (right click on an image and then right click on "view"). Everything else works fine - select, download, rename, delete etc. and the image is displayed properly in CKFinder. In the error it it says it cannot find: /Sitename/ckfinder/Images/test.jpg. The image is actually in /Sitename/Images/test.jpg. For some reason it is adding a CKFinder folder to the image directory. Any help would be most appreciated. I am using asp.net by the way.
Thank you
Thu, 06/17/2010 - 18:39
#1
Re: HTTP 404 Error on View - Cannot find image
For me it looks like invalid baseUrl is used (/Sitename/ckfinder/ instead of /Sitename/ ?).
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: HTTP 404 Error on View - Cannot find image
Here is what I think is relevant from the config.ascx file:
BaseUrl = "Images/";
BaseDir = Server.MapPath("").Substring(0, Server.MapPath("").IndexOf("ckfinder")) + "Images";
type = ResourceType.Add( "Files" );
type = ResourceType.Add( "Files" );
type.Url = "PDF/";
type.Dir = Server.MapPath("").Substring(0, Server.MapPath("").IndexOf("ckfinder")) + "PDF";
type = ResourceType.Add( "Images" );
type.Url = BaseUrl ;
type.Dir = BaseDir == "" ? "" : BaseDir ;
Let me know what you think.
Dennis Honan
Re: HTTP 404 Error on View - Cannot find image
instead of storing files in the "ckfinder" folder, perhaps a better way would be to store them in a separate folder, like "userfiles", "files" or something like that.
If this will work for you, you may start definig other resource types and changing the configuration above to use Server.MapPath.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: HTTP 404 Error on View - Cannot find image
The files are currently not being stored in the ckfinder folder. They are in the website root folder for Images and PDF , in other words they are in F:\websitename\Images and F:\Websitename\PDF. CkFinder is in F:\Websitename\ckfinder. With my current settings, everything works fine except for the view function.
Thank you,
Dennis Honan
Re: HTTP 404 Error on View - Cannot find image
I guess that the type.Url is simply wrong in your case. Please use Fiddler or Firebug to trace all HTTP requests while you're trying to view that file and then try to correct the type.Url variable.
If you're having troubles with setting it, please paste the URL that CKFinder was trying to open.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+