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

JK 6 Reputation points
2021-07-22T22:22:53.057+00:00

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.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,746 questions
{count} vote

4 answers

Sort by: Most helpful
  1. JW 11 Reputation points
    2022-03-11T09:49:55.293+00:00

    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.

    2 people found this answer helpful.
    0 comments No comments

  2. Nowshin Jahan 6 Reputation points
    2021-10-28T10:09:17.743+00:00

    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 person found this answer helpful.

  3. Echo Du_MSFT 17,116 Reputation points
    2021-07-23T02:36:42.74+00:00

    Hello @JK ,

    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.


  4. Jean Haley 1 Reputation point
    2022-11-09T08:37:18.21+00:00

    I just tested this simple trick, and it worked:

    1) Create your first file ToBeUpdated.txt

    2) In your OneDrive, share that file (create a anyone can view link)

    3) Create your second file Newer.txt

    4) In cmd.exe prompt, copy Newer.txt ToBeUpdated.txt (just copy the newer "on top of" the previous file, effectively replacing the file)

    5) Wait for the OneDrive file Status to update. Now the file is updated but the share link remains the same!

    I also found out that the same work by doing it in Explorer (copy/move from another folder to overwrite with the same filename). (FYI some other programs work so that they first delete the file and then save the file, in which case the link is lost.)