Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Examples and how to

Database restored without filedata - how to add a file to an existing object

Last updated on 28 September 2023

Admin
M-Files Desktop

Overview

Restoring a vault metadata copy without the file data is a common occurrence when, for example, testing database restore or investigating an issue in a vault.

Using the existing documents in the restored vault to test functionalities is often quicker and corresponds better to the actual usage of the vault. 

However, many of the operations in the vault will cause an error message, as the actual file of that document does not exist. It is not possible to drag and drop a new file on top of the missing one, as that will also cause an error. Attempting to make a copy of the existing object will also throw an error.

Attempting to drag and drop a new document on top of existing:

image.png

Will lead to:

image.png

Attempting to preview document will throw:

image.png

See the sample stack at the end of the document.

Solution

Convert the existing document to a multi-file document. Add your new test file, remove the original file, and convert it back to a single file, as needed.

image.png

In case the document is already a multi-file, you can just remove the non-existing file and add your new test file.

Sample stack

Error thrown when attempting to replace a document with a new one when the file does not exist:

CoDropTarget.cpp, 553, An internal error occurred. (0x8007054F)

CoDropTarget.cpp, 932, An internal error occurred. (0x8007054F)

CoDropTarget.cpp, 1403, An internal error occurred. (0x8007054F)

MFShellCommands.cpp, 12029, An internal error occurred. (0x8007054F)

CoShellFolder.cpp, 6943, An internal error occurred. (0x8007054F)

FileHelper.cpp, 3887, An internal error occurred. (0x8007054F)

(M-Files 23.8.12892.6 2023-09-25T06:08:32.810Z)

Still need help?