Hi,
Unfortunately, document attachment field type is not supported in the system table because of security and performance reasons.
Alternatively, you could use file selector to enable user upload their files. You can add the field of file selector type into cms.user system table and then into the layout of appropriate alternative forms.
To display link to file in the Display Profile alterantive form please do not forget to set Default Visibility in field definition (in aleternative form) and then change the field type to label - this way GUID will be displayed instead of file selector.
Instead of Field type: Label control you can create a custom form control that will create a link from the GUID. How to create path to file based on its guid is shown in the below code:
Guid iguid = new Guid("eb1b5175-d7e6-479e-a19e-dbd6be035c16");
// Tree node
CMS.TreeEngine.TreeNode node = null;
// Tree provider
UserInfo ui = UserInfoProvider.GetUserInfo("administrator");
CMS.TreeEngine.TreeProvider tree = new CMS.TreeEngine.TreeProvider(ui);
// Get Single node specified by it`s GUID, culture code, site code
node = tree.SelectSingleNode(iguid, CMSContext.CurrentPageInfo.DocumentCulture, CMSContext.CurrentSite...SiteName);
string href= node.NodeAliasPath + ".aspx";
Another approach is to use user contribution in combination with custom document type to enable users upload files.
Please take a look at following example:
devnet.kentico.com/docs/devguide/example_editing_partner_profile.htmUsing above approach user could attach files for example on his profile page. Each user could edit only his profile page, but could see (download) files from profile of other users.
Best regards,
Ivana Tomanickova