Skip to Content
Former Member
Dec 19, 2005 at 04:41 AM

How to store the images in KM using Code



i retreived the images from KM using the following code.

import com.sapportals.portal.prt.component.AbstractPortalComponent;

import com.sapportals.portal.prt.component.IPortalComponentRequest;

import com.sapportals.portal.prt.component.IPortalComponentResponse;

import com.sapportals.portal.prt.resource.IResource;

public class ThumbnailTes extends AbstractPortalComponent {

/* (non-Javadoc)

  • @see com.sapportals.portal.prt.component.AbstractPortalComponent#doContent(com.sapportals.portal.prt.component.IPortalComponentRequest, com.sapportals.portal.prt.component.IPortalComponentResponse)


public void doContent(IPortalComponentRequest request,IPortalComponentResponse response) {

String path =request.getResource(IResource.IMAGE,"images/sap1.gif").getResourceInformation().getURL(request);

response.write("<img src = "path"/>");



but i want to store the images in KM using code.Can anybody help me.

acutally the image is my location(c:/images/sap1/jpg).i want to upload this image to KM using code.

Can anybody help me how to do that?