Skip to content

Commit

Permalink
feat(store): silently ignore file transforms on non-image files
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkdev98 committed Jul 11, 2023
1 parent 325a270 commit 08f097e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/store/src/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ export async function fileTransformInPlace(
) {
eventStart(event, "file.transformInPlace");

if (!STORE_FILE_IMAGE_TYPES.includes(file.contentType)) {
// Don't even attempt it.
eventStop(event);
return;
}

const fileStream = await objectStorageGetObjectStream(s3Client, {
bucketName: file.bucketName,
objectKey: file.id,
Expand Down

0 comments on commit 08f097e

Please sign in to comment.