Everytime you have to work with blob type data in just few lines you can load and save fille in AX in container type field. Works on client and server side.
Below you can see example of how to load file to container and back, form container to file:
BinData binary;
FilePath filePath;
FileIoPermission perm;
container con;
;
filePath = @"c:\temp\from.jpg";
binary = new BinData();
perm = new FileIoPermission(filePath, 'rw');
perm.assert();
binary.loadFile(filePath);
con = binary.getData();
binary.setData(con);
binary.saveFile(@"c:\temp\to.jpg");
Please check MSDN to see more sources where from you can read and save data to.
No comments:
Post a Comment