# Trouble replacing file while maintaining share link

**URL:** <https://help.nextcloud.com/t/trouble-replacing-file-while-maintaining-share-link/123440>\
**Category:** ℹ️ Support\
**Created:** [September 10, 2021, 1:22pm UTC](https://help.nextcloud.com/t/trouble-replacing-file-while-maintaining-share-link/123440 "2021-09-10T13:22:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PolarTheDog](https://help.nextcloud.com/letter_avatar/polarthedog/32/6_22734026db12803ebb3e059622ac3534.png) [@PolarTheDog](https://help.nextcloud.com/u/PolarTheDog)\
**Post date:** [September 10, 2021, 1:22pm UTC](https://help.nextcloud.com/t/trouble-replacing-file-while-maintaining-share-link/123440/1 "2021-09-10T13:22:56Z")

</div>

I have some existing video files that I have shared via links but I uploaded files that were of way higher quality that I need. I have been trying to replace them, ie keeping the sharelink the same but have had no success.

I have tried:  
1.Uploading a new file via ftp and changing the file name  
2. Uploading a new file and changing the oc\_share record in the db to point to new file.

I am not sure how to continue or what to try next. Any advice?

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [September 12, 2021, 8:51pm UTC](https://help.nextcloud.com/t/trouble-replacing-file-while-maintaining-share-link/123440/2 "2021-09-12T20:51:27Z")

</div>

you didn’t describe if you changed the file in the **supported** way - e.g. using Web UI or desktop client… AFAIK this way the share should keep intact… once this works you may try to improve your workflow with additional tools…

---

<div class="post-metadata">

**Author:** ![PolarTheDog](https://help.nextcloud.com/letter_avatar/polarthedog/32/6_22734026db12803ebb3e059622ac3534.png) [@PolarTheDog](https://help.nextcloud.com/u/PolarTheDog)\
**Post date:** [September 13, 2021, 7:12pm UTC](https://help.nextcloud.com/t/trouble-replacing-file-while-maintaining-share-link/123440/3 "2021-09-13T19:12:39Z")

</div>

I have not found any reference in any documentation regarding changing files that have already been shared. There is no “edit” button that I could see… Perhaps you can point me in the right direction?

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [September 13, 2021, 7:26pm UTC](https://help.nextcloud.com/t/trouble-replacing-file-while-maintaining-share-link/123440/4 "2021-09-13T19:26:10Z")

</div>

until you don’t run Collabora or OnlyOffice there is no way to **“edit”** - you just upload (replace) the file you previously stored. but you can’t just replace the file in the server’s file structure (like FTP). you need to use a way controlled by NC software like upload the file through the web interface, WebDAV or desktop client (on the desktop you definitely can change the file but the result is the same - another version is uploaded to the server).

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 14, 2024, 3:44pm UTC](https://help.nextcloud.com/t/trouble-replacing-file-while-maintaining-share-link/123440/5 "2024-12-14T15:44:52Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 14, 2024, 3:44pm UTC](https://help.nextcloud.com/t/trouble-replacing-file-while-maintaining-share-link/123440/6 "2024-12-14T15:44:53Z")

</div>


