Compartir a través de


Accessing BLOB Data from External Systems Using Business Connectivity Services

Ok guys, this is a new feature which I came across while exploring BCS. BCS now supports getting BLOBs into SharePoint and provide many features which help in pulling and streaming BLOB's out to end user.

The work which I did on this has been published as a whitepaper courtsey to some folks in Redmond. Here is the link to published article:

Accessing BLOB Data from External Systems Using Business Connectivity Services in SharePoint Server 2010

Want to say thanks to Arpan, Michal Gideoni, Brad Stevenson, Juan Balmori Labra and Beck Andros for providing all the support to write this article.

Comments

  • Anonymous
    April 28, 2010
    can we update the BLOB data using any mechanism with external content type as we can do with metadata?

  • Anonymous
    April 28, 2010
    The StreamAccessor are meant for streaming BLOB's for reading. They can't update back. You can use normal updater methods to update back small amount of data where you can use byte[] as the data types.

  • Anonymous
    April 29, 2010
    There's no mention in the white paper of retrieving blob data from Windows Azure or SQL Azure, which is surprising when you consider Microsoft's cloud agitprop on the topic. Is a similar white paper in the works for Windows Azure/SQL Azure? --rj

  • Anonymous
    June 28, 2010
    The comment has been removed

  • Anonymous
    June 30, 2010
    Dag, The warning below is generally seen if the correct extension is not specified. One more thing to note is that the extension should be specified without a leading period (as eml and not .eml). Can you also share your model file for me to analyze. Send to tejeshwers @ hotmail.com.

  • Anonymous
    August 20, 2010
    I've used your example but in my case I want to stream content from the file system.  I got it all working but when I click the "Click here to download" link on the Item Profile Page I get the following message: Failed to retrieve data from the External System: 'Error - No content exists for this field.' I attached the debugger and stepped through the call and I can see that my System.IO.Stream object gets initialized correctly and has content so I'm not sure what's going on.    Your specific example uses byte array as the return type but as far as I understand System.IO.Stream should be fine too. I can email you my model xml if you'd like to review.

  • Anonymous
    August 20, 2010
    @Peter- Are you using web service, custom .NET shim to read the file stream? I havent tried with anything apart from DB but it should work.

  • Anonymous
    April 01, 2012
    Nice post. I'm having the same issue as that of Peter. When I try to stream the BLOB from web, I'm getting an exception saying "Failed to retrieve data from the External System: 'Error - No content exists for this field." This is my coding in the StreamAccessor method: public static Stream GetMediaFile(string id)        {                string filePath = ReadItem(id).Url.Trim();                Uri fileUrl = new Uri(filePath);                HttpWebRequest myFileWebRequest = (HttpWebRequest)WebRequest.Create(fileUrl);                HttpWebResponse myFileWebResponse = (HttpWebResponse)myFileWebRequest.GetResponse();                Stream receiveStream = myFileWebResponse.GetResponseStream();                return receiveStream;        } Do you have a solution for this?

  • Anonymous
    April 01, 2012
    Try to Seek the stream to start before you return in function. I think its at end due to GetResponseStream and hence fails when BCS tries to read from stream which is at end.

  • Anonymous
    November 18, 2013
    @tajeshwar singh : Same issue on my side, and seeking to start solve pbm  ! many thanks for tips !