diff --git a/components/FolderGridLayout.tsx b/components/FolderGridLayout.tsx
index b64a3f4..1a04c44 100644
--- a/components/FolderGridLayout.tsx
+++ b/components/FolderGridLayout.tsx
@@ -11,9 +11,20 @@ import { formatModifiedDateTime } from '../utils/fileDetails'
import { getReadablePath } from '../utils/getReadablePath'
import { Checkbox, ChildIcon, Downloading, formatChildName } from './FileListing'
-const GridItem = ({ c }: { c: OdFolderChildren }) => {
+const GridItem = ({ c, path }: { c: OdFolderChildren; path: string }) => {
// We use the generated medium thumbnail for rendering preview images
- const thumbnail = c.thumbnails && c.thumbnails.length > 0 ? c.thumbnails[0].medium : null
+ const thumbnailUrl =
+ 'folder' in c
+ ? // Folders don't have thumbnails
+ null
+ : c.thumbnails
+ ? // Most OneDrive versions, including E5 developer, should have thumbnails returned
+ c.thumbnails.length > 0
+ ? c.thumbnails[0].medium.url
+ : null
+ : // According to OneDrive docs, OneDrive for Business and SharePoint does not
+ // (can not retrieve thumbnails via expand). But currently we only see OneDrive 世纪互联 really does not.
+ `/api/thumbnail?path=${path}`
// Some thumbnails are broken, so we check for onerror event in the image component
const [brokenThumbnail, setBrokenThumbnail] = useState(false)
@@ -21,11 +32,11 @@ const GridItem = ({ c }: { c: OdFolderChildren }) => {
return (