Skip to content

Commit

Permalink
fix: Put the files that failed to compress into the compressedFiles (#…
Browse files Browse the repository at this point in the history
…1097)

[CLNP-3111](https://sendbird.atlassian.net/browse/CLNP-3111)

### Issue
The files are not sent when failing to compress them, because the files
that failed to compress have not added into the sending file list.
### Fix
* Put the files that failed to compress into the compressedFiles
### Change log
* Fixed issue where files that failed to compress were not being sent
  • Loading branch information
HoonBaek authored May 23, 2024
1 parent e4e8bab commit 28cfcb5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/compressImages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export const compressImages = async ({
});
result.compressedFiles.push(compressedImage);
} catch (err) {
result.compressedFiles.push(file);
result.failedIndexes.push(index);
logger?.warning('utils - compressImages: Failed to compress image file', { file, err });
}
Expand Down

0 comments on commit 28cfcb5

Please sign in to comment.