t;;
>> > >> >> >>> HttpRequestFileUpload
>> uploadObject
>> =
>> > >> new
>> > >> >> >>> HttpRequestFileUpload();
>> > >> >> >>>
>> > >>
HttpRequestFileUpload
>> uploadObject
>> =
>> > >> new
>> > >> >> >>> HttpRequestFileUpload();
>> > >> >> >>>
>> > >> >> >>> uploadObject.setOverrideFilename(defaultFileName);
>
;> >> >>> uploadObject.doUpload(request);
> > >> >> >>>
> > >> >> >>> }catch(IOException e){
> > >> >> >>> Debug.logInfo("Image uplo
0) {
> >> >> >>> if
> >> >> >>> (categoryImageFileName.lastIndexOf(".")
> >> >> >>> > 0 && categoryImageFileName.lastIndexOf(".") <
> >> >> >>> categoryIm
// end of upload image
>>>>
>>>> Timestamp fromDate = UtilDateTime.nowTimestamp();
>>>> GenericDelegator delegator = (GenericDelegator)
>>>> request.getAttribute("delegator");
>&g
filenameToUse +=
>> >> >>>
>> >>
>> categoryImageFileName.substring(categoryImageFileName.lastIndexOf("."));
>> >> >>> } else {
>> >> >>>
acterEncoding);
> >> >>> }catch(Exception e){
> >> >>> System.out.println("Incoding
> >> Problem");
> >> >>>
+ filePathPrefix, defaultFileName);
>> >>> File file1 = new
>> >>> File(imageServerPath
>> >>> + "/" + filePathPrefix, filenameToUse);
>> >>> try {
>
rimaryKey("DataImportCategory",
>>> UtilMisc.toMap("productCategoryId", productCategoryId));
>>>
>>> if(DataImportCategoryList != null){
>>> String categoryId =
>>> DataImportCategoryList.get
file.renameTo(file1);
> >>> } catch(Exception e) {
> >>> e.printStackTrace();
> >>> }
> >>> }
> >>>
>> delegator.findByPrimaryKey("DataImportCategory",
>>> UtilMisc.toMap("productCategoryId", productCategoryId));
>>>
>>> if(DataImportCategoryList != null){
>>> String ca
ug.logInfo("Successfully
imported category ["+productCategoryId+" from row no "+ i+1 +"].",
module);
successCount++;
} catch (GenericEntityException e) {
Debug.logWarning(e.getMessage(),
module);
}
}
} catch(GenericEntityException e) {
Debug.logError("Exception occured :"+e.getMessage(), module);
}
}
}
it create the temp file in corresponding directory but there is no actual
image at that path.
So any one have any idea regarding this please suggest me.
Thanks.
Nalin Chandra
--
View this message in context:
http://n4.nabble.com/how-to-import-data-from-excel-sheet-tp160724p585955.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
ntCategoryId);
> newImportCategory.set("categoryName", categoryName.trim());
> newImportCategory.set("description", description);
> newImportCategory.set("longDescription", longDescription);
> newImportCategory.set("categoryImageUrl", catImageUrl);
> newImportCategory.set("linkOneImageUrl", linkImageUrl);
> newImportCategory.set("fromDate",
> fromDate);
> try {
>
> delegator.create(newImportCategory);
> Debug.logInfo("Successfully
> imported category ["+productCategoryId+" from row no "+ i+1 +"].",
> module);
> successCount++;
> } catch (GenericEntityException e) {
> Debug.logWarning(e.getMessage(),
> module);
> }
>
> }
> } catch(GenericEntityException e) {
> Debug.logError("Exception occured :"+e.getMessage(), module);
>}
> }
>
> }
>
>
> it create the temp file in corresponding directory but there is no actual
> image at that path.
>
> So any one have any idea regarding this please suggest me.
>
>
> Thanks.
>
> Nalin Chandra
>
--
View this message in context:
http://n4.nabble.com/how-to-import-data-from-excel-sheet-tp160724p585955.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
and Update to ofbiz trunk after release 4.0 lets you pass a URL to the
service and it will import, size the images and put one for each size in
the correct folder.
you can see this work but going to the product content page and paste a
URL in the upload box
glad you found a solution.
Nalin Chand
;> if(categoryId.equals(productCategoryId)){
>>> failCount++;
>>> }
>>> }else {
>>> GenericValue newImportCategory =
>>> delegator.makeValue("DataImportCategory", null);
>>>
>>> newImportCategory.set("productCategoryId",
>>> productCategoryId.trim());
>>> if(productCategoryTypeId != null &&
>>> productCategoryTypeId.length()
>>> 0){
>>> newImportCategory.set("productCategoryTypeId",
>>> productCategoryTypeId.trim());
>>> } else {
>>>
>>> newImportCategory.set("productCategoryTypeId", "CATALOG_CATEGORY");
>>> }
>>> if(primaryParentCategoryId != null &&
>>> primaryParentCategoryId.length() > 0)
>>> newImportCategory.set("primaryParentCategoryId",
>>> primaryParentCategoryId);
>>> newImportCategory.set("categoryName", categoryName.trim());
>>> newImportCategory.set("description", description);
>>> newImportCategory.set("longDescription", longDescription);
>>> newImportCategory.set("categoryImageUrl", catImageUrl);
>>> newImportCategory.set("linkOneImageUrl", linkImageUrl);
>>> newImportCategory.set("fromDate",
>>> fromDate);
>>> try {
>>>
>>> delegator.create(newImportCategory);
>>> Debug.logInfo("Successfully
>>> imported category ["+productCategoryId+" from row no "+ i+1 +"].",
>>> module);
>>> successCount++;
>>> } catch (GenericEntityException e)
>>> {
>>>
>>> Debug.logWarning(e.getMessage(),
>>> module);
>>> }
>>>
>>> }
>>> } catch(GenericEntityException e) {
>>> Debug.logError("Exception occured :"+e.getMessage(), module);
>>>}
>>> }
>>>
>>> }
>>>
>>>
>>> it create the temp file in corresponding directory but there is no
>>> actual
>>> image at that path.
>>>
>>> So any one have any idea regarding this please suggest me.
>>>
>>>
>>> Thanks.
>>>
>>> Nalin Chandra
>>
>>
>
> --
> BJ Freeman
> http://www.businessesnetwork.com/automation
> http://bjfreeman.elance.com
> http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
> Systems Integrator.
>
>
>
--
View this message in context:
http://n4.nabble.com/how-to-import-data-from-excel-sheet-tp160724p277368.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Ok the way to upload changes with out a form.
First understand that in the form way the image is uploaded into server
memory, from your desktop, then you read the data from the server memory
and put it into a file. This is a function of the webbrowser not ofbiz.
The problem is that a server can not
ImportCategory.set("primaryParentCategoryId",
> primaryParentCategoryId);
> newImportCategory.set("categoryName", categoryName.trim());
> newImportCategory.set("description", description);
> newImportCategory.set("longDescription",
images, that are displayed are stored physically at
/framework/images/webapp/images/catalog
/frameework/images/webapp/images/products/large
/framework/images/webapp/images/products/medium
/framework/images/webapp/images/products/small
/framework/images/webapp/images/products/additional
the last on
Date",
fromDate);
try {
delegator.create(newImportCategory);
Debug.logInfo("Successfully
imported category ["+productCategoryId+" from row no "+ i+1 +"].
19 matches
Mail list logo