• Welcome to KonaKart Community Forum. Please login or sign up.
 

Images upload problem

Started by michaelwechner, May 21, 2010, 11:18:10 am

Previous topic - Next topic

michaelwechner

Hi

I have installed the Enterprise Edition 4.2.0.1 on a Linux server using the silent installer.

Nevertheless the base path of images was still set to some Windows path.

I have reconfigured it to something like /home/foo/konakart-images

and one is able to upload images and I can see them within this directory, e.g.

/home/foo/konakart-images/some-path/some-image.jpg

but KonaKart does not display these images, neither within the konakartadmin nor within the frontend webapp konakart.

I have found the following documentation

http://www.konakart.com/docs/AppServerNotes.html#ImageConfigs

but unfortunately this didn't really help me.

Any pointers are very much appreciated.

Thanks

Michael

moamoa

@michaelwechner, before I explain where I am, do this; In your product admin page, do right-click properties over the images that does not show, check that the path to the image is correct. I had this issue too. Once you fix that, you will probably be where I am below...


I have much the same problem. I however can see them in admin after some messing about, just not on main site.

In admin setup I have;

Image base URL: http://www.domain.co.uk/images/
Image base path: /usr/local/websites/www.domain.co.uk/images

If I upload an image I can see it in the right directory and it shows in admin, as in;
http://www.domain.co.uk/images/pig.png, which is actually;
/usr/local/websites/www.domain.co.uk/images/pig.png

fine to here, makes sense.

When I look on the main site I see nothing. If i view the source I can see stuff like;
<img src="images/pig_3.png">

Q.

1. Where is the _3 coming from? I have no images called that, there is none in my image folder callled that, just the original pig.png I uploaded?

2. What's with the path? why is it not "http://www.domain.co.uk/images/"; as I defined in the config? images/pig_3.png will be relative to my webapp somewhere and I don't want to put images there!

I must be missing something here as it makes no sense :(


michaelwechner

I was able to fix the problem by doing the following steps:

1) Login to konakartadmin webapp (U: admin@konakart.com, P: princess)
2) Click on "Configuration" (left hand navigation)
3) Click on Images (left hand navigation)
4) Fix the path and URL, e.g.
     Image base URL: http://localhost:9780/konakart/images/
     Image base path: /Users/michaelwechner/konakart-4.2.0.1/webapps/konakart/images
     and save ...
5) Click on Products (left hand navigation)
6) Create new product
7) Click on Tab "Images"
8) Click on "Browse" and upload image --> Field "Image name" should be filled
9) Copy/Paste string from "Image name" to field "Image 1" and click on image icon and then image should show up
10) On command line change directory to "Image base path", e.g. 'cd /Users/michaelwechner/konakart-4.2.0.1/webapps/konakart/images"
10.1) Copy image (e.g. my-image.jpg) to something like my-image_1.jpg and my-image_1_big.jpg which is a convention used within webapps/konakart/WEB-INF/jsp/ProductDetailsBody.jsp

AFAIK the reasoning behind all of this is that most shop owners are uploading images as a bulk process instead manually.

HTH

Michael

moamoa

This still leaves all the images in the webapp. I do not want them there. If I places them on the webserver outside of the webapp it makes it much easier to deploy a new version of the webapp. If I make a change and then redeploy the .war file, hot can this be done?

Surely the product images, as per the database should be "outwith" the webapp as this is content?

I should be able to make a change to a jsp page, bundle the war, and redeploy without having the images in the war?

trevor

June 23, 2010, 06:54:26 am #4 Last Edit: June 23, 2010, 07:55:34 am by trevor
You can place the images outside of the webapp. In this case the normal practice is to write a servlet that your jsps can use to to load them. However, your images may not be available for search engines, price comparison web sites etc. depending on the visibility of the servlet.

moamoa

Still a bit confused.

1. Why is there a setting in Admin/Images which is the URL of the images, if this is not used by the konakart front end? What is the point of this if Admin/Products looks as this to display the images when you upload them (and works), but the front end ignores this and used "images/x.jpg" always?


trevor

QuoteWhy is there a setting in Admin/Images which is the URL of the images, if this is not used by the konakart front end?

So that you can view the images from the admin app which may be deployed in a completely different server to the app.