Image Upload Problem

65 views
Skip to first unread message

iainb...@gmail.com

unread,
Jun 6, 2017, 4:33:47 AM6/6/17
to KalikoCMS Developer Forum
Hi, Just starting out with Kaliko. I have a property:
[ImageProperty("Image1", Width = 800, Height = 533)]
public virtual ImageProperty Image1 { get; set; }

When I upload an image in Admin the file uploads to a folder 'Files' and not into ImageCache. The thumbnail is not created. The image file is not available to select after upload. I have added imageCachePath="/ImageCache/" to site settings but makes no difference. I have updated ImageLibrary to latest version in Nuget but no difference.

Any ideas what the problem is?

Fredrik Schultz

unread,
Jun 6, 2017, 9:14:00 AM6/6/17
to KalikoCMS Developer Forum
Are you using the property directly in a page type class or as a part of a composite property type? There was a bug that was fixed in the current pre-release (1.2.1-rc2) concerning collection of composite properties. If you're using it directly in a page type, then the problem is something else and I'll try to reproduce it later today.

Do you get any error reported in the log file (by default) located in App_Data?

iainb...@gmail.com

unread,
Jun 6, 2017, 12:36:34 PM6/6/17
to KalikoCMS Developer Forum
No error in log file. In a page type class like this:
PageTypes/HomePageType.cs

using KalikoCMS.Attributes;
using KalikoCMS.Core;
using KalikoCMS.PropertyType;

namespace VPAGlobal.PageTypes
{
[PageType("HomePage", "Home Page", "~/Templates/Pages/HomePage.aspx", PageTypeDescription = "Home Page")]
public class HomePageType : CmsPage
{
[Property("Heading1")]
public virtual StringProperty Heading1 { get; set; }

[Property("Heading2")]
public virtual StringProperty Heading2 { get; set; }

[ImageProperty("Image1", Width = 800, Height = 533)]
public virtual ImageProperty Image1 { get; set; }

//[Property("Preamble")]
//public virtual TextProperty Preamble { get; set; }

[Property("Main body")]
public virtual HtmlProperty MainBody { get; set; }

[Property("Tags")]
public virtual TextProperty Tags { get; set; }
}
}

Fredrik Schultz

unread,
Jun 6, 2017, 4:26:54 PM6/6/17
to KalikoCMS Developer Forum
I've tried to reproduce the problem but it works for me, both in the current stable release (1.2.0) and the upcoming release (1.2.1-rc2). I wonder if it can be a content specific issue. Do you use any particular file type for your images?

All uploads goes into the path specified in the filePath attribute (if not not specified the default is /Files/). Once the image has been selected in an image property it will be saved in the path specified in imageCachePath (by default /ImageCachePath/) if it was cropped. Regardless if it was cropped a thumbnail will be saved in the _thumbs sub-folder.

Do I understand correctly that the image isn't available in this view after being uploaded?:


iainb...@gmail.com

unread,
Jun 6, 2017, 5:50:09 PM6/6/17
to KalikoCMS Developer Forum
Hi Fredrick,

The first thing I tried was to specify the path in web.config but it made no difference.
<siteSettings adminPath="/Admin/" datastoreProvider="KalikoCMS.Data.StandardDataStore, KalikoCMS.Engine" startPageId="c6841363-fbb7-47b6-a609-bddd2f6ff576" imageCachePath="/ImageCache/" filePath="/Files/" />

I have tried jpg and png and they both end up in the Files folder not in ImageCache and no thumb is created. The file shows green background after you click Start Upload but when you Return to File List it is not there so you cannot select it. Also there is no folder name.

If you click Create Folder and type a folder name then click OK, the folder is not created.

If you delete the Files folder then try to upload you get Internal Server Error as you would expect.

Shall I try update to 1.2.1-rc2 or try remove Kaliko in Nuget and then reinstall?

Fredrik Schultz

unread,
Jun 11, 2017, 5:59:20 AM6/11/17
to KalikoCMS Developer Forum
Hi, just wanted to check so that you received the email concerning this issue I sent a few days ago properly?

iainb...@gmail.com

unread,
Jun 13, 2017, 9:54:09 AM6/13/17
to KalikoCMS Developer Forum
Hi Fredrik, Yes got it many thanks and just replied. Iain.

ldm...@gmail.com

unread,
Feb 18, 2018, 5:02:05 PM2/18/18
to KalikoCMS Developer Forum
Hi Fredrik,

I've been looking for a ASP.NET CMS with Web Forms support for a while but most work with membership authentication. So I like very much Kaliko works with Identity and lets me integrate my own logic in certains pages.

I've been trying Kaliko out for a couple of days, deeping in my programing knoladge, and I'm starting to understand it and create my first hello word site based on https://www.codeproject.com/Articles/845483/Build-a-website-with-Kaliko-CMS-using-WebForms, but I'm running into this same issue: I can upload images to Files folder but they don't appear in Kaliko's Select File modal, and can neither create new folders.

PD: I'm using version 1.2.3.0

Thanks a lot for your effort and for your help.

Fredrik Schultz

unread,
Feb 19, 2018, 2:08:31 AM2/19/18
to KalikoCMS Developer Forum
Hi, 
Nice to hear that you're trying out the CMS! 

Do you get any related errors in the log file within the App_Data folder? If you look in the Files directory on disk, are the uploaded files present there?
Reply all
Reply to author
Forward
0 new messages