Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
fix thumbnail generation not proceeding for images and videos
Browse files Browse the repository at this point in the history
remove url from resources.json serialization
  • Loading branch information
dinomut1 committed Jun 6, 2024
1 parent fb1cbc3 commit 38f170e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ const ThumbnailJobReactor = () => {
.then((blob) => uploadThumbnail(src, project, id, blob))
.then(() => jobState.set(jobState.get(NO_PROXY).slice(1)))
)
}, [fileType])
}, [fileType, id])

// Load and render video
useEffect(() => {
Expand All @@ -342,7 +342,7 @@ const ThumbnailJobReactor = () => {
.then(() => video.remove())
.then(() => jobState.set(jobState.get(NO_PROXY).slice(1)))
)
}, [fileType])
}, [fileType, id])

// Load and render texture
useEffect(() => {
Expand All @@ -366,7 +366,7 @@ const ThumbnailJobReactor = () => {
.then(() => image.remove())
.then(() => jobState.set(jobState.get(NO_PROXY).slice(1)))
)
}, [fileType, tex])
}, [fileType, tex, id])

// Load models
useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ const patchProjectResource =
if (field === 'userId') {
delete (updatedResource as any)[field]
}
if (field === 'url') {
updatedResource.url = ''
}
if (field === 'thumbnailURL') {
const cacheRe = new RegExp(`^${config.client.fileServer}\/`)
updatedResource.thumbnailURL = updatedResource.thumbnailURL.replace(cacheRe, '')
Expand Down

0 comments on commit 38f170e

Please sign in to comment.