diff --git a/packages/sn-client-core/src/Repository/Upload.ts b/packages/sn-client-core/src/Repository/Upload.ts index c8a7cc06d..4ff1e7bad 100644 --- a/packages/sn-client-core/src/Repository/Upload.ts +++ b/packages/sn-client-core/src/Repository/Upload.ts @@ -174,7 +174,7 @@ export class Upload { method: 'POST', headers: { 'Content-Range': `bytes 0-${this.repository.configuration.chunkSize - 1}/${options.file.size}`, - 'Content-Disposition': `attachment; filename="${options.file.name}"`, + 'Content-Disposition': `attachment; filename="${encodeURIComponent(options.file.name)}"`, }, }) @@ -200,7 +200,7 @@ export class Upload { method: 'POST', headers: { 'Content-Range': `bytes ${start}-${end - 1}/${options.file.size}`, - 'Content-Disposition': `attachment; filename="${options.file.name}"`, + 'Content-Disposition': `attachment; filename="${encodeURIComponent(options.file.name)}"`, }, }) if (lastResponse.ok) {