1

How can I get documents thumbnail using pnp-js-core or rest api.

I need to render a document card with its thumbnail.

Thanks.

1
  • 2
    When you say thumbnail, do you mean the document type icon or something else?
    – AtariPixel
    Commented Mar 7, 2018 at 3:53

1 Answer 1

0

This parameter expects a value equal to the URL of the document/file for which you want to generate a thumbnail. To generate a preview, the URL should look like this:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.