Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Compression Node): Fix issue with decompression failing with uppercase extensions #6098

Merged
merged 1 commit into from
Apr 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/nodes-base/nodes/Compression/Compression.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class Compression implements INodeType {
group: ['transform'],
subtitle: '={{$parameter["operation"]}}',
version: 1,
description: 'Compress and uncompress files',
description: 'Compress and decompress files',
defaults: {
name: 'Compression',
color: '#408000',
Expand Down Expand Up @@ -197,7 +197,7 @@ export class Compression implements INodeType {
const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);

if (binaryData.fileExtension === 'zip') {
if (binaryData.fileExtension?.toLowerCase() === 'zip') {
const files = await unzip(binaryDataBuffer);

for (const key of Object.keys(files)) {
Expand All @@ -213,7 +213,7 @@ export class Compression implements INodeType {

binaryObject[`${outputPrefix}${zipIndex++}`] = data;
}
} else if (binaryData.fileExtension === 'gz') {
} else if (binaryData.fileExtension?.toLowerCase() === 'gz') {
const file = await gunzip(binaryDataBuffer);

const fileName = binaryData.fileName?.split('.')[0];
Expand Down