ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chunlinyao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-5658) checkExistsImage method in ImageManagementServices
Date Sun, 22 Jun 2014 09:32:25 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-5658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14040081#comment-14040081
] 

chunlinyao commented on OFBIZ-5658:
-----------------------------------

I started learning OFBiz recently. So I haven't use Image Management in other place. Just
playing with the vanilla OFBiz. Upload images from Image Management works. And I can view
the uploaded images from ecommerce webapp.
The Image Management can not upload at first, I created a tmp folder under runtime to fix
it.

The images for products is not processed consistently.  We can upload from Product -> Content
view OR upload from Image Management. And they saved in different places.

> checkExistsImage method in ImageManagementServices 
> ---------------------------------------------------
>
>                 Key: OFBIZ-5658
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5658
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: Release Branch 13.07
>         Environment: any
>            Reporter: chunlinyao
>            Priority: Trivial
>
> I think indexOf(".") in these code should be lastIndexOf(".")
> public static File checkExistsImage(File file) {
>         if (!file.exists()) {
>             imageCount = 0;
>             imagePath = null;
>             return file;
>         }
>         imageCount++;
>         String filePath = imagePath.substring(0, imagePath.indexOf("."));
>         String type = imagePath.substring(imagePath.indexOf(".") + 1);
>         file = new File(filePath + "(" + imageCount + ")." + type);
>         return checkExistsImage(file);
>     }



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message