diff --git a/src/components/Dashboard/common/Thumbnail.jsx b/src/components/Dashboard/common/Thumbnail.jsx index b2f34b5..89bf0cf 100644 --- a/src/components/Dashboard/common/Thumbnail.jsx +++ b/src/components/Dashboard/common/Thumbnail.jsx @@ -42,7 +42,6 @@ const Thumbnail = function Thumbnail({ borderRadius: '5px', width: size, height: size, - border: 'none', ...style } @@ -151,7 +150,7 @@ const Thumbnail = function Thumbnail({ {fallback || ( diff --git a/src/components/Dashboard/context/ApiServerContext.jsx b/src/components/Dashboard/context/ApiServerContext.jsx index 84d10cf..83d457c 100644 --- a/src/components/Dashboard/context/ApiServerContext.jsx +++ b/src/components/Dashboard/context/ApiServerContext.jsx @@ -1510,7 +1510,7 @@ const ApiServerProvider = ({ children }) => { } } - const fetchFileThumbnail = async (file, size) => { + const fetchFileThumbnail = async (file, size, show404Error = false) => { try { const response = await axios.get( `${config.backendUrl}/files/${file._id}/thumbnail`, @@ -1528,6 +1528,9 @@ const ApiServerProvider = ({ children }) => { }) return window.URL.createObjectURL(blob) } catch (err) { + if (err.response.status === 404 && show404Error == false) { + return null + } console.error(err) showError(err, () => { fetchFileThumbnail(file, size) diff --git a/src/database/models/GCodeFile.js b/src/database/models/GCodeFile.js index 824a066..a338150 100644 --- a/src/database/models/GCodeFile.js +++ b/src/database/models/GCodeFile.js @@ -164,6 +164,7 @@ export const GCodeFile = { showPreview: false, showHyperlink: true, masterFilter: ['.gcode', '.g'], + thumbnail: true, columnWidth: 200 }, {