문제

I'm looking at getting a thumbnail image of documents when uploaded into a document library. I can see the thumbnail preview when I click on ellipses (...) context menu of the document. Is there a way to somehow get this document using Rest API?

I did try the below for a .png file.

https://tenant.sharepoint.com/sites/test_layouts/15/getpreview.ashx?path=https%3A%2F%2Ftenant.sharepoint.com%2Fsites%2Ftest%2FTestWork.png 

It worked for .png file but not for word, excel or PDF documents.

Thanks in advance

도움이 되었습니까?

해결책

Not sure if you know rest api but This should return the url of the thumbnail -->

/_api/web/lists/getbytitle('title')/items(itemid)?$select=EncodedAbsThumbnailUrl

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top