Skip to Content

ResourceException while trying to upload file twice

Hi all,

I have an WDJ application to upload document into KM.

I can upload the document once, but not manage to upload it for the second time.

I think the problem is in the .createResource() method of ICollection interface.

How can I allow user to upload and overwrite the document many times using the same name ?


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Oct 07, 2010 at 01:28 PM


    When you use the standard KM Upload functionality, and upload a document for the 2nd time you get a warning:


    "An item with this ID already exists"

    An item with this name already exists. You can overwrite the existing item or create a new item with the same name or a different name. Overwriting the existing item will retain any additional information associated with that item, such as the description or any annotations.

    (radiobutton 1) = Overwrite Existing Item, Retaining Associated Information

    (radiobutton 2)= Save As (EditBox)


    So the Standard KM functionality does have logic in it that recognizes that there is a 2nd upload.

    I would advise you to reverse engineer from this logic. Maybe the sources are in the DC otherwise decompile with [JAD|].



    Edited by: Benjamin L.F. Houttuin on Oct 7, 2010 3:31 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 02:37 PM

    Creating and updating are different things. In the former case you obtain an ICollection for the container, and invoke createResource. In the latter case, you the IResource for the existing document, and just update the contents.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.