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

Jacques Le Roux commented on OFBIZ-5658:
----------------------------------------

Hi chunlinyao,

Did you not encouters errors (reported in UI for instance)? Are you using a 
*nix OS (I use Windows hence the question)?

>The Image Management can not upload at first, I created a tmp folder under 
>runtime to fix it.
But we have already a tmp folder under runtime

>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.
Yes the content way existed before and is reliable. I initially thought that 
the Image Management was an improvement upon it, but it seems it's totally 
dissociated, which is a pity (the content way is a bit tedious). It would be 
great if we could combine them. But anyway I was just curious, the project I'm 
currently working on does not use the OFBiz UI, only OFBiz services. So I'm not 
that interested for now, thanks to share your experience!

> 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)

Reply via email to