diff --git a/backend/src/file/file.controller.ts b/backend/src/file/file.controller.ts index f51ca44..551c5b7 100644 --- a/backend/src/file/file.controller.ts +++ b/backend/src/file/file.controller.ts @@ -32,7 +32,8 @@ export class FileController { ) { const { id, name, chunkIndex, totalChunks } = query; - const data = body.toString().split(",")[1]; + // Data can be empty if the file is empty + const data = body.toString().split(",")[1] ?? ""; return await this.fileService.create( data,