Forum Discussion

Akshay9720's avatar
Akshay9720
Copper Contributor
Mar 05, 2020

Unable to see preview thumbnail images in SharePoint online

Hello folks,

 

When I set Banner Image URL in SharePoint Online modern site page using MS Flow, preview thumbnail images are not shown in carousel/page cards. It works perfectly fine when I set the Banner image manually. I tried with action "Send HTTP Request to SharePoint" and "Update Item" to update banner image URL, but problem still persists.

I tried to troubleshoot the issue and found that, URL for thumbnail images gives out 400 bad request error. Format of thumbnail image URL is like - 

https://xxxxxxxxxxxxxxxxxx.sharepoint.com/_api/v2.0/sharePoint:/sites/xxxxxxx/xxxxxxx/xxxxxxxxxxx.jpg:/driveItem/thumbnails/0/c400x99999/content?preferNoRedirect=true&clientType=modernWebPart

 

Sample Error:

 

 

{"error":{"code":"generalException","message":"[OneDrive.Media.Streams] e:\\source\\repos\\mediaprocessingcomponents2\\streams\\streamonuriimpl.cpp(647) *** HTTP 400 ***\r\n*** RAWURL ***\r\nhttps://xxxxxxxxxxxxxxxxxxxx.sharepoint.com/_api/v2.0/sharepoint:sites/xxxxxxxx/xxxx/xxxxx.jpg:/driveItem/versions/Published/streams/content_preview_T0002560.0.0/streamContent?VroomTakeover=1\r\n*** RAWHEADERS ***\r\nHTTP/1.1 400 Bad Request\r\nCache-Control: private\r\nDate: Thu, 05 Mar 2020 16:56:03 GMT\r\nTransfer-Encoding: chunked\r\nContent-Type: application/json\r\nP3P: CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"\r\nServer: Microsoft-IIS/10.0\r\nX-SharePointHealthScore: 1\r\nX-VroomVersion: 2.0\r\nX-AspNet-Version: 4.0.30319\r\nSPRequestGuid: xxxxx-xxxx-xxxx-xxxx-xxxxxxx\r\nrequest-id: xxxxx-xxxx-xxxx-xxxx-xxxxxxx\r\nMS-CV: nzvcz9HwAKB8ffPrECsbjw.0\r\nStrict-Transport-Security: max-age=31536000\r\nX-FRAME-OPTIONS: SAMEORIGIN\r\nX-Powered-By: ASP.NET\r\nMicrosoftSharePointTeamServices: 16.0.0.19819\r\nX-Content-Type-Options: nosniff\r\nX-MS-InvokeApp: 1; RequireReadOnly\r\n\r\n*** RAWBODY:\r\n{\"error\":{\"innerError\":{\"code\":\"apiNotFound\"},\"code\":\"invalidRequest\",\"message\":\"API not found\"}}\r\n*** END *** 0x80004005 Unspecified error.\r\n[OneDrive.Media.Streams] e:\\source\\repos\\mediaprocessingcomponents2\\streams\\streamonuriimpl.cpp(1695) The stream is in a fatal error state and can no longer be used. 0x80004005 Unspecified error.\r\n[OneDrive.Media.Streams] e:\\source\\repos\\mediaprocessingcomponents2\\streams\\streamonuriimpl.cpp(1563) 0x80004005 Unspecified error.\r\n[OneDrive.Media.Streams] e:\\source\\repos\\mediaprocessingcomponents2\\streams\\streamonuriimpl.cpp(1988) 0x80004005 Unspecified error.","innererror":{"code":"Web_400BadRequest"}}}

 

Please help me to resolve this issue. Please let me know if you need more details from me.

Thanks in advance.

  • HiAkshay9720,

     

    I don't have a solution but I am in a similar situation where I receive a 400 bad request error using the SharePoint HTTPS action in Power Automate.

     

    Did you post on the Power Automate community site?

     

    I hope this helps.

     

    Norm

     

  • Akshay9720,

     

    Quick update, I fixed it on my end. Share the send HTTPS request action config and I will try to assist as I can.

     

    Norm

    • Akshay9720's avatar
      Akshay9720
      Copper Contributor

      Norman Young 

       

      I tried two actions to set BannerImageUrl. one is with "Update item" action as below.

       

      Another with "Send Http Request to SharePoint" action

       

      Please find below JSON body:

       

      {"__metadata":{"type":"SP.Data.SitePagesItem"},"SnapImageURL":{"__metadata": { "type": "SP.FieldUrlValue" }, "Description": "@{variables('AttachmentURL')}", "Url": "@{variables('AttachmentURL')}"},"Title":"@{variables('NameToBeUsedInTitle')}","OData__AuthorBylineId":{"__metadata":{"type":"Collection(Edm.Int32)"},"results":[@{variables('AuthorId')}]},"BannerImageUrl":{"__metadata": { "type": "SP.FieldUrlValue" }, "Description": "@{variables('AttachmentURL')}", "Url": "@{variables('AttachmentURL')}"},"LayoutWebpartsContent":"@{variables('LayoutHTMLContent')}"}

      • julilis's avatar
        julilis
        Copper Contributor

        Akshay9720 

         

        This is fantastic.

         

        Would you mind sending all the process?

         

        Thanks 🙂

Resources