1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-11-05 07:20:13 +01:00

fix: empty file can't be uploaded in chrome

This commit is contained in:
Elias Schneider 2023-03-14 20:24:21 +01:00
parent 2158df4228
commit 9f2097e788
No known key found for this signature in database
GPG Key ID: 07E623B294202B6C

View File

@ -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,