Skip to Content

Create download link to file in KM

Hi,

In our portal I have configured a couple of KM iViews (on KM repositories) for anonymous access. Works fine.

Now I would like to create a URL to a file in 1 of those repositories. The purpose is that when a user enters that URL in a browser, he/she will be asked if they want to download the file or not.

Does anyone knows if it is possible to generate such a URL?

Under Details -> Settings -> Properties -> Access of a file, there is a target URL. This URL works, but it opens the file for me and doesn't give the option to download it.

Regards

Edmond

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 04:33 PM

    The KM HTTP servlet supports that, but you need to build a different URI.

    As far as I recall, for a KM doc such as

    http://server/irj/go/km/docs/repository/test.doc

    the URI would be

    http://server/irj/go/km/docs?action=download&URI=/irj/go/km/docs/repository/test.doc

    (this is what you get when you choose "download" from the KM UI).

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Edmond Paulussen

      You're welcome.

      Please keep in mind that the format for the URI is subject to change without notice. If this is critical to you you may want to ask SAP to either document it, or to expose an API to compute it.

      Best regards, Julian

  • Posted on Jun 17, 2008 at 03:45 PM

    Hi Edmond,

    This depends on

    - the file itself (its extension and/or mime type)

    - the client (how for example the browser handles different mime types)

    For example, if the mime type is "text/html", the browser directly opens the content. If it is "application/pdf", it may be opened within the browser or you are asked to download/open it, which again is dependent on the browser plugin and/or on the headers sent by the portal docs components.

    Hope it helps to narrow this down

    Detlev

    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.