You can use M-Files for sharing documents with interested parties through direct web links. This feature makes it possible to, for example, provide a company web site with a direct link to a price list in M-Files. The link can be made to always refer to the latest version of the document, to be able to provide up-to-date information at all times. The link works in the same way as any ordinary web URL.
Normally, M-Files Web always requires a login name and a password to be entered. However, if the system is used for publishing, it may often be necessary to allow users to view documents without entering any credentials. To enable this, M-Files can be set to use a predetermined login account with, for example, read permissions for certain documents.
To create a login account and a user in the document vault for publishing purposes:
Before continuing any further, make sure M-Files Web is configured properly. For more information, refer to Enabling Web and Mobile Access.
To make it possible to view published documents without logging in, M-Files must be set to log in automatically through M-Files Web. This way, published documents can be viewed without entering a username and password. To ensure sufficient permissions, an unlimited read-only license is required.
To enable users to log in automatically:
HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\<version>\Server\MFWA\Sites\<web site ID>\
Example of a registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\11.1.4310.92\Server\MFWA\Sites\1\
Registry key values for automatic login
Value | Type | Description |
---|---|---|
Domain | REG_SZ | If the authentication method used is Windows authentication, use this value to specify the domain. |
Password | REG_SZ | Login password. |
UserName | REG_SZ | Login account name, for example "publishing". |
Vault | REG_SZ | The document vault ID. The value can be for instance {A8DCB561-913F-4318-A276-E7E171EAFBE6}. The value can be found in the Document Vault Properties window of M-Files Admin. |
WindowsUser | REG_DWORD | Specifies the authentication method. 0 means M-Files authentication, 1 means Windows authentication. |
Once automatic login is enabled, you can create direct web links between, for example, the company web site and document files. The opening page, openfile.aspx, can be assigned the following parameters.
M-Files Web parameters for document opening page:
Parameter | Description |
---|---|
docid | ID of the document containing the file to be opened. This parameter is compulsory. |
docver | Version of the document containing the file to be opened. This parameter is not compulsory. If this parameter is not used, the link always refers to the latest version of the document. |
fileid | ID of the file to be opened. This parameter is not compulsory, unless the document containing the file is a multi-file document. |
filever | File version. |
objtype | Object type ID of the object to which the file to be opened belongs. This parameter is not compulsory. If this parameter is not used, the link always refers to files of the Document object type. |
showopendialog | This parameter specifies whether or not the web browser displays an opening dialog. If the value assigned to this parameter is 0, the dialog is not displayed. |
As described above, you can provide your web site with a link that refers directly to a document. Below are examples of such web links. Replace <server> with the web address of your own server.
http://<server>/openfile.aspx?docid=71
http://<server>/openfile.aspx?docid=71&docver=7
http://<server>/openfile.aspx?docid=71&docver=7&fileid=71
http://<server>/openfile.aspx?docid=71&showopendialog=0
In addition, you can use Share via OneDrive links for version-specific publication of individual documents.