question

JK-8713 avatar image
0 Votes"
JK-8713 asked BoyanBiandov-1673 commented

SharePoint Document ID - replace file while keeping same document ID (no broken URL)

SharePoint Document ID is a greatly appreciated feature since it allows for renaming and movement of files while maintaining link integrity. However, when doing proper change management on documents the editing of the doc happens away from the location where it is published for "public" consumption. Then, the new (and fully approved version) is uploaded with the same name (intent is to maintain the URL). But, the upload causes a new document ID to be generated and that breaks the link. Disappointing that something that touts being a solid document management platform breaks URLs when the item is being replaced.

office-sharepoint-online
· 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.

OP (JK-8713) has a correct assessment of the problem and no solution has been given. Some commenters miss the detail that JK is using the (somewhat more advanced) Unique Document ID assigned to a document if the SharePoint option is turned on. This option claims to make links based on it not break even if you rename or move the file around. This is different from a standard link based on path and filename.
It appears that the DocID method solves the move and rename link breaking issue but not the edit separately and replace issue as it issues a fresh ID.
I am looking to solve a related issue... editing separately and replacing while maintaining the version history/continuity and column metadata as if it had been edited in-place. I assume the same replace method may solve both issues.
Looking for SharePoint Doc Library All-Star...

0 Votes 0 ·
EchoDu-MSFT avatar image
0 Votes"
EchoDu-MSFT answered Sam-2481 published

Hello @JK-8713 ,

Welcome to Q&A Forum!

According to my research, upload file with same name to replace the original file in SharePoint will indeed create a new Document ID. It is correct behaviour in my opinion.

Because Sharepoint cannot know whether the document is "same". In other words, SharePoint will consider these to be two different files, regardless of whether they have the same name or not

The only way is to update and edit the file directly in its Sharepoint-Location.


Thanks,
Echo Du
==================================
If an 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.




· 2
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 @JK-8713 ,

Is there anything else I can help with regarding this issue?
You can comment us at any time and we will continue to follow up.

Thanks,
Echo Du

0 Votes 0 ·

Hi. I've uploaded a doc with the same name and the old link worked just fine. Cheers!

0 Votes 0 ·
NowshinJahan-0641 avatar image
0 Votes"
NowshinJahan-0641 answered BoyanBiandov-1673 commented

As long as the file name is the same, you can drag the file from your email/PC to the sharepoint folder; then click on Replace

· 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, we are NOT talking about the file name and path based URLs, those are related to the file name and you are correct - it doesn't break it. However in this use case we're talking about the links which open the files inside the browser and are special - example:

https://XYZ.sharepoint.com/:x:/g/MQT/MRGE/Efw740a-g4xGo9XyLsJzsJIBIXJZMv9FLJV9D0XjLPzuNQ?e=dDRheI

0 Votes 0 ·
JW-4991 avatar image
1 Vote"
JW-4991 answered

From my experience, replacing a PDF with a new file did not invalidate the previously shared link.
In my case, the PDF file was generated from a set of slides. When I make changes to my slides, I regenerate a new PDF and replace the original, and the previously shared link still works.

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.