Author Topic: Cannot load images  (Read 1470 times)

iamcp

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Cannot load images
« on: November 09, 2007, 03:55:32 PM »
Hello,
Thank you for a wonderful cart to use for us. I have installed Konakart in my machine and I'm trying to upload images for a new product I want to add using konakartadmin package, but konakart is throwing an exception while I tried to do that.

Application complaints about "Empty file specified for upload" but the image file is not empty.

In the image path I give subdirectry/imagename.gif under images directory.

In the select image text box I give the imagename.gif.

In image1 testbox I give some name for description.

Does anyone has any idea why this is happening?

Thanks in advance


Here is the error

09-Nov 15:48:01 INFO  (FileUpload.java:processUploadedFile:153) Upload File imgB
asePath = C:/Konakart1/webapps/konakart/images  imgPath = matrox/mg200mms
.gif
java.lang.Exception: Empty file specified for upload
        at com.konakartadmin.servlet.FileUpload.processUploadedFile(FileUpload.j
ava:198)
        at com.konakartadmin.servlet.FileUpload.doPost(FileUpload.java:86)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)


pete

  • Administrator
  • Sr. Member
  • *****
  • Posts: 226
    • View Profile
    • KonaKart Website
Re: Cannot load images
« Reply #1 on: November 09, 2007, 04:25:26 PM »
Hi iamcp,

First of all please check that you've read the help on that images page of the admin app - it contains some useful information for loading images.

In image1 you must put the location of the image file that you uploaded not a description (the full file location is "Image base Path" plus the location you specify in this field).

Did you browse for the filename of the new image?  Is there a valid filename in the select file textbox?

Regards - Pete

iamcp

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Cannot load images
« Reply #2 on: November 09, 2007, 05:06:30 PM »
Thank you for the advice, I was able to solve the issue.
But now I have 4 images for a particular product in the Admin app, but when a user tries to view the same product, only one image(first) is visible in the browser . Do i have to enable anything to view all 4 images from the customer side?

Thanks in advance

pete

  • Administrator
  • Sr. Member
  • *****
  • Posts: 226
    • View Profile
    • KonaKart Website
Re: Cannot load images
« Reply #3 on: November 09, 2007, 05:16:45 PM »
Hi iamcp,

You have to edit the JSP and add prod.getImage2(), prod.getImage3() etc. where you want to display the other images. The default application that we ship only displays one image.

Regards - Pete

iamcp

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Cannot load images
« Reply #4 on: November 28, 2007, 03:02:37 PM »
I have done it and it worked like a charm, thanks for the post.
iamcp