question

JonssonLarsKonsult-1723 avatar image
0 Votes"
JonssonLarsKonsult-1723 asked JonssonLarsKonsult-1723 answered

Creating link to document in Sp2019 On Premise

We are have issues with the link that is created when chosing ... Copy link in document librarys.

The last part of the created URL: xxxx.xlsx?csf=1&e=lZbyNW , in this case when using the link the user gets message if he/she trusts the content etc. before opening the actual document, if we remove everything after xxxx.xlsx.... the link works fine and the document opens directly.

How do we get around the creation of ?csf= when copieing links?

office-sharepoint-server-customization
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ElsieLu-MSFT avatar image
0 Votes"
ElsieLu-MSFT answered ElsieLu-MSFT commented

Hi @JonssonLarsKonsult-1723 ,

This this the behavior by default. Csf=1 means added when sharing with People with existing access.

As mentioned, similar to:

130975-57.jpg

d= xxxx – this will help creating a unique URL to allow opening the file in the browser. If you remove this parameter, you’ll get a download request. This parameter is only added when you share with People with existing access.
Csf=1 – added when sharing with People with existing access
Web=1 – opens the file in the browser
E= xxxx – The purpose of this parameter isn’t really known; if you remove it, the Share will work the same way.

For more information you could refer to:
Understanding how Share-links are built in SharePoint and OneDrive
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

A similar post:
What is the purpose of "?csf=1" ?


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


57.jpg (15.7 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @JonssonLarsKonsult-1723 , is there any update? I am willing to hear from you.

0 Votes 0 ·
WendyLi-MSFT avatar image
0 Votes"
WendyLi-MSFT answered

Hi @JonssonLarsKonsult-1723 ,

Like Elsie said, "csf=1" is added when sharing with people with existing access, this behavior is similar to SharePoint Online.

Did you configure Office Online Server(OOS) for your SharePoint 2019 environment?

In my environment, I just have SharePoint 2019 (16.0.10371.20043) without OOS. I copied the link of an Excel file from a library via "Copy Link", then used the copied link with "?csf=1" directly to access the file again, it downloaded the document, which is a normal result without OOS.

The copied link I used is:
http://v19/Shared%20Documents/New%20Text%20Document.txt?csf=1&e=cSRwr4

Result:
136917-image.png

Also, if I remove "?csf=1..." after the coped link, and use the new link to open the file, it also redirects me to download the file.

So, please have a try and let's know your result.



image.png (9.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JonssonLarsKonsult-1723 avatar image
0 Votes"
JonssonLarsKonsult-1723 answered

Would the OOS help us in this case.
Right now staff who like to share a link with others with access to a document need to remove the "?csf=1..." for the user so they don't need to go trought the hazard of clicking on "would you like to open the file "xxxx" pop-up?

/Lars

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.