I am writing a custom app to interact with a document library. During deployment I have a module to populate the document library with some sample data, however I am not able to populate the Title field for each document.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="DemoCVs" Url="Lists/CVs">
<File Path="DemoCVs\Jane Doe CV.docx" Url="Jane Doe CV.docx" Type="GhostableInLibrary">
<Property Name="Title" Value="Jane Doe" Type="string" />
</File>
<File Path="DemoCVs\John Smith CV.docx" Url="John Smith CV.docx" Type="GhostableInLibrary">
<Property Name="Title" Value="John Smith" Type="string" />
</File>
</Module>
</Elements>
The documents are successfully uploaded to the library, but the title field is always empty.
If I alter the file attribute to include Name like so
<File Path="DemoCVs\Jane Doe CV.docx" Url="Jane Doe CV.docx" Type="GhostableInLibrary" Name="Jane Doe">
The title is set, however the document name loses its extention. Setting the extension as such
<File Path="DemoCVs\Jane Doe CV.docx" Url="Jane Doe CV.docx" Type="GhostableInLibrary" Name="Jane Doe CV.docx">
Makes the title property empty again.
Is this not the correct method, or have I made a mistake?