cancel
Showing results for 
Search instead for 
Did you mean: 

Saving a downloaded image to an internal directory ?

Former Member
0 Kudos

I am getting several images as byte[] during a running WDP application.

For displaying them in a view, I want to save them as jpg files under the internal

folder /src/mimes/components under the application file structure.

How to make it happen ?

I tried different WDP classes like WDResourceFactory etc. But I can't understand where it is storing and how to retrieve it afterwards.

Thanks for the help,

Prasad Nutalapati

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Why do you need to store in that place. You can directly use the byte [] to show the image using the following code.


IWDResource cache = WDResourceFactory.createCachedResource(wdContext.nodeLeaveAssessmentMap().currentLeaveAssessmentMapElement().getEmpImage(),fileName,WDWebResourceType.JPG_IMAGE);
// EmpImage is of type byte [].
// filename is any file name of String type.
wdContext.nodeImage().currentImageElement().setImageSrc(cache.getUrl(0));
// ImageSrc is the attribute mapped to source property of the image UI in the view.

Hope this helps.

thanks & regards,

Manoj

Edited by: Manoj Kumar on May 9, 2008 12:33 PM

Former Member
0 Kudos

Hello Manoj:

Thanks for the help.

I forgot to mention that I want to conserve the backend connection resources.

It is MDM Server. Those images pretty much are constant for every user.

They are about 100 or more in number.

So I can use the images in the dynamic fashion as you suggested.

Thanks,

Prasad

Former Member
0 Kudos

Hi,

Well then i am really sorry that i cant help you as i dont have any idea about MDM server.

Hope you will get the solution sonn from the GURUS here.

thanks & regards,

Manoj

Former Member
0 Kudos

Hey,

can't u store the images in a JDT? it can be done dynamically. both storing as well as retrieving. If the images are static and same for all the users, it can be done using a JDT. Tell me if its fine.

Answers (0)