Export (0) Print
Expand All

Uploading a File to HealthVault

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"));

PersonInfo.SelectedRecord.NewItem(file);

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;

Show:
© 2014 Microsoft