Quantcast
Channel: SQL Server Master Data Services forum
Viewing all articles
Browse latest Browse all 1311

Upload File using MDS WCF API

$
0
0

I have a field of File Type in my Entity. How can I upload file using WCF API?

I tried to create a new Entity Member and added the following attribute in the member attributes collection

Attribute att = new Attribute();
att.Identifier = new Identifier();
att.Identifier.Name = "Image";

att.Value = bytes;

In attribute value I tried to pass the bytes array of an image, also tried Encoding.ASCII.GetString(bytes); as attribute value, but none of them works.

With byte array i get the following exception "Conversion failed when converting the nvarchar value 'System.Byte[]' to data type int." and in case of ASCII string i get "A database error has occurred. Contact your system administrator." error.

There is lack of documentation and samples.

Please let me know if someone tried it out.

Thanks!



Viewing all articles
Browse latest Browse all 1311

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>