-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document-library-thumbnails not all documents are previewing #795
Comments
Hi @GustavoAlmeidaAboud . When I tried it in my environment, Excel, Word, PDF, etc. displayed the preview image without any problem. |
@tecchan1107 Mainly PDF, but we have over 200+ files. |
Thanks for the reply. On my end, the PDF was also previewed. Do you have the following set up? (Here is an excerpt from the ViewRequirements in the README) If the above settings are not made, only folders will be displayed as shown below. |
Hi @tecchan1107 , the Allow management of contents is allowed, looks like the page doesn't render correctly with all the preview of the pds :/ |
Hmmm... I changed the code to use @thumbnail to display a preview image. When you have time, I hope you will try the following code. Sample Code{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"hideSelection": true,
"hideColumnHeader": true,
"rowFormatter": {
"elmType": "a",
"attributes": {
"class": "ms-borderColor-neutralLight",
"href": "[$FileRef]"
},
"style": {
"float": "left"
},
"children": [
{
"elmType": "div",
"attributes": {
"class": "ms-bgColor-themeLighterAlt ms-bgColor-themePrimary--hover ms-fontColor-white--hover"
},
"style": {
"display": "flex",
"flex-wrap": "wrap",
"flex-direction": "column",
"align-items": "stretch",
"padding": "1px",
"margin": "10px",
"max-width": "930px",
"box-shadow": "2px 2px 4px darkgrey"
},
"children": [
{
"elmType": "img",
"attributes": {
"src": "=if(startsWith([$ContentTypeId],'0x0120'),'https://spoprod-a.akamaihd.net/files/fabric/assets/item-types/96/archive.png',@thumbnail.medium)"
},
"style": {
"width": "auto",
"height": "300px"
},
"children": [
{
"elmType": "span",
"txtContent": "[$FileName]",
"style": {
"margin-bottom": "1px"
},
"attributes": {
"class": "ms-fontSize-m ms-fontWeight-regular ms-fontColor-neutralSecondary"
}
}
]
}
]
}
]
}
} |
When using the gallery view, are preview images displayed? If possible, I would like you to check this as well. Gallery.mp4 |
Hello @tecchan1107 , Thank you very much for helping with this matter. I can view all the previews in the gallery view without any trouble. Regarding the page, there seems to be an intermittent pagination issue. Initially, I can see all the previews smoothly with the "Library-Thumbnails" json formatted view. However, as I scroll down the page, the flickering starts, and only a portion of the previews are displayed. |
Thank you for checking and for your reply! |
Thank you for reporting a bug! Use the sections below to submit a bug ONLY if it's related to samples in this repo. If you have an issue or question about list formatting or its documentation, please submit it at https://aka.ms/spdev-issues
DELETE EVERYTHING ABOVE AFTER READING - THANKS!
Sample (which sample are you having trouble with)
document-library-thumbnails
What Should Happen
The image preview thumbnail should be for all the files
What Actually Happens
Some files are not showing the thumbnails
The text was updated successfully, but these errors were encountered: