cancel
Showing results for 
Search instead for 
Did you mean: 

Path of a file to a location in KM

Former Member
0 Kudos

Hello,

1) I need to understand the difference between two different ways of using the same path (link) that is used to fetch a document from a repository.

    a) href="https://answers.sap.com/irj/go/km/docs//docs/test_pages/images/voila.png"

    and

   b) href="http://mydevelopmentserver:50100/irj/go/km/docs//docs/test_pages/images/voila.png"

I read in a post somewhere that the a) path above can be used in place of b) above. This means that I do not have to give the server details in the code. However when I use the a) path above (without the server name and details), the code is not able to locate my file and throws an error. It runs fine with the b) path above when I give the server details.

Request if the experts can help me in understanding the above.

2) What is the significance of giving a double slash (/) after "docs" in the path to a file location as below.

    href="http://mydevelopmentserver:50100/irj/go/km/docs//docs/test_pages/images/voila.png"

Thanks

SB

Accepted Solutions (1)

Accepted Solutions (1)

SandipAgarwalla
Active Contributor
0 Kudos

SB

Using the relative path in the code saves you from modifying it later when you transport the code thru different environments.

Where ever possible, you should use the relative path.

What is the error you getting when you use the relative path..

The url you have given in point a) does not look ok to me..

/irj/go/km/docs//docs/test_pages/images/voila.png

It contains a double slash, which i think is not right..Instead it should be /irj/go/km/docs/docs/test_pages/images/voila.png

Sandip

Former Member
0 Kudos

Thanks Sandip,

When I use : href="/irj/go/km/docs//docs/test_pages/images/voila.png"

The image is not displayed on the page. Any clues suggestions.

Thanks

SandipAgarwalla
Active Contributor
0 Kudos

Remove the extra slash from the path..

ALso make sure the image is available at the path

Former Member
0 Kudos

Thanks it works.

1. Can you explain what relative path is (might sound like a silly question but still).

2. and also can i imagine /irj equivalent to /root in a linux directory structure?

3. If the answer to 2 above is yes then does it mean that everything starts in portal from /irj? and that is why we start from /irj everytime.

thanks

Answers (0)