Uploading a File to HealthVault

Uploading a File to HealthVault


Files, like everything else in HealthVault, are stored in XML. In fact, the File class is really a fairly thin wrapper over the underlying type. The File type stores the name of the file, the size, and the type of the content in the file.

Microsoft.Health.ItemTypes.File file =    File.CreateFromFilePath(@"C:\My Pictures\picture.jpg”, new CodableValue("image/jpg"));


That uploads the file into HealthVault. Only core section comes down by default, so if you want to get the contents of the file back, you specify:

filter.View.Sections = HealthRecordItemSections.All;

© 2016 Microsoft