How to store the images in KM using Code

Hello,
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?

Hi Kasturi,
> not accepting the points
It worked on this and on one other thread, but this is still open: How to upload the image
> want upload the images from the client side machine
> to KM
In the thread I just referred to, I already provided information about the HTMLB upload control. With this at hand, you'll get the file from the client to the server.
At server side, get an ICollection instance where you want to store the file and create the corresponding resource. See https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/javadocs/nw04/sp12/knowledge management/com/sapportals/wcm/repository/icollection.html#createresource(java.lang.String,%20com.sapportals.wcm.repository.IPropertyMap,%20com.sapportals.wcm.util.content.IContent)
Hope it helps
Detlev

Similar Messages

  • How to store the images in Oracle?

    Hi,
    I am a new developer, trying to find out how to store the images in Oracle. Is there anyway that I can store the images in Oracle and insert them into my html file?
    Thanks!
    Sarah

    There is a simple image example available from OTN.
    From the OTN main page, go to Products --> interMedia --> Sample Code. The name of the example is "Load rich media content with a browser."
    This example loads and retrieves an image from an Oracle8i database through a web page using the Oracle interMedia Web Agent.
    Hope this helps.
    null

  • How to store the images in tables

    how to store the images in tables .what is the use of "clob ,blob"

    Using with the CLOB or BLOB, you can store the images in the table.
    Srini C

  • [CS2]How to get the Image Width & Height using JS (ILLUSTRATOR CS2)

    Hi,
    How to get the Image width & height of an Image using javascript .Im using Illustrator CS2.
    Any sample code
    Regards
    MyRiaz

    you can reference the dimensions of a loading image (or swf)
    by referencing the target movieclip's dimensions AFTER loading is
    complete. ie, use preloader code or the onLoadInit() method of a
    moviecliploader listener.

  • How to store the image in CRM database

    Hi,
    We have requirement for storing the image in the database. User can brwse for image and store it to the database and shoud retrive it for display.
    Please need help , how to do this.
    Thanks,
    Sushant

    Hi
    I hope these links will help:
    http://help.sap.com/saphelp_crm60/helpdata/de/43/a996152ce41bbde10000000a1553f7/frameset.htm
    http://help.sap.com/saphelp_crm60/helpdata/de/36/844c5cb496dc428344d3ea4c46d3b0/frameset.htm
    RP

  • How to adjust the image captured when using Shift Ctrl Command 4 shortcut

    After installing Mavericks on my macbook pro I now have issues when I use shift ctrl command 4.  When pasting the image into an email it is very large and I am unable to edit it.  It used to copy in much smaller. 

    Open Preview Application.
    Select you image.
    Click on Tools and select Adjust Size:
    Enter the desired parameters:
    Ciao.

  • How to store the certificate file by using import java.security package?

    Hi,
    I have a certificate file whose extension is .p12(So, it conforms to pkcs 12 standart).
    I wanna store this file which is in my file system in my pc. and I wann to store this file to smart card?
    // this two row just load the specified file
    KeyStore keyStore = KeyStore.getInstance("PKCS12");
    keyStore.load(new java.io.FileInputStream(pkcs12File), keyPassword);
    // I need to store keyStore object to smart card. but I do not know how to? Any idea????

    This is not adding external p12 f�le inside the smart card ? Am I right? I want a p12 f�le to add this this file to smart card indside

  • How to import the image by using java application

    1.how to import the image by using java APPLICATION and display it on the textarea that you have been created.
    2.how to store the image into the file.
    3. what class should i used?
    4. how to create an object to keep track the image in java application.
    * important : not java applet.
    plzzzzzzz.
    regards fenny

    follow the link:
    http://java.sun.com/docs/books/tutorial/2d/images/index.html

  • How to store jpeg images in SQL server using NI database Connectivity Toolset. Can anyone please help me in this regard.

    Please tell how to store jpeg images in SQL Server using NI Database Connectivity Toolset.

    http://www.w3schools.com/sql/sql_datatypes.asp
    You setup a field as BLOB and store the binary of the picture there. Depending on the database it can be called differently as you can see in the link, in SQL server there's even a Image datatype.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • How to give  acces  to app to use  the  images in device through code

    Hi,
    I am writting an Iphone app, in some part of my application there is a facility  to the users  to  upload their files , but the device is asking to give permission to the app to access files,   i have to do that  manually , my question   is there any way to acheive that through code,  In  am  using Xcode to  create my app
    Thanks.

    Hi Kasturi,
    > not accepting the points
    It worked on this and on one other thread, but this is still open: How to upload the image
    > want upload the images from the client side machine
    > to KM
    In the thread I just referred to, I already provided information about the HTMLB upload control. With this at hand, you'll get the file from the client to the server.
    At server side, get an ICollection instance where you want to store the file and create the corresponding resource. See https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/javadocs/nw04/sp12/knowledge management/com/sapportals/wcm/repository/icollection.html#createresource(java.lang.String,%20com.sapportals.wcm.repository.IPropertyMap,%20com.sapportals.wcm.util.content.IContent)
    Hope it helps
    Detlev

  • How to upload the image and diplay the image in the browser using jsp

    How to upload the image and diplay the image in the browser using jsp
    thanks
    shan

    i'll suggest looking for sample code or tutorial with a relevant query in google, which as far more time than us to answer this type of reccurent question

  • How to display the image which in KM folder using url iview

    Hi Friends
    How to display the image, which is under KM folder structur using the url iview.
    i trying using url iview url as  \document\testfolder\abc.jpg as url for the iview.
    but its now working .. so please help me how to slove this problem
    If is not the correct way then please suggest me best way to achive this.
    Thanks
    Mukesh

    Hi Mukesh,
    I think this may work,
    1, Create a HTML Layout.
        You can put your image wherever  u want with HTML Codes.
        Check this, [Article|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3915a890-0201-0010-4981-ad7b18146f81] & [Help|http://help.sap.com/saphelp_nw04/helpdata/en/cc/00c93e9b2c3d67e10000000a114084/frameset.htm]
        With this, u can use the standard KM commands also.
    2, U need to use KM Navigation iView for this rather than KM Doc iView.
    3, In the Nav iView, u can use &rndLayoutSet=nameOfUrHTMLLayout to force the view with this new layout.
    Regards
    BP

  • I need to know how to change the identity (email address) used for the iTunes store as I no longer use that email

    I need to know how to change the identity (email address) used for the iTunes store as I no longer use that email.

    Settings > iTunes & App store.
    Tap AppleID, sign out then sign back in.
    The Apple ID is right everywhere else. I've synced the phone. I've reset it in Settings on the phone. I've changed it at Apple.
    When you write, "I've changed it at Apple, this means you updated yoru old AppleID or you ceated a new AppleID?

  • How to store the output of a analog to digital converter into an 2D array

    Hi
    I am doing my M.Tech Thesis in Image reconstruction and I am using labview for simulation and I want to know how to store the output of a analog to digital converter into an 2D labview array.

    nitinkajay wrote:
    I want to know how to store the output of a analog to digital converter into an 2D labview array.
    How exactly are you performing 'Analog to Digital'???
    Grabbing image using camera OR performing data acquisition using DAQ card OR some other way????
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • How to store photo images and thumbimpressions in oracle 10g database

    Hi all
    I have an web application running in Oracle 10g rel 1 database server in RHEL3. It has application server with forms and j2ee component as middle tier. I need to store centrally photo images and thumb impressions and use it in our application without any overhead on retrieval and performance of web application. what will be optimized method of storage of photo and thumb impressions. Awaiting your valuable suggestions.
    Regards
    Vijay Kumar

    Hi Vijay,
    How to store photo images and thumbimpressions in oracle 10g database I have working code here for storing photos in Oracle tables that you may find useful:
    http://www.dba-oracle.com/t_storing_insert_photo_pictures_tables.htm
    Hope this helps . . .
    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference"
    http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

Maybe you are looking for