0
Fork 0
mirror of https://github.com/stonith404/pingvin-share.git synced 2025-01-15 01:14:27 -05: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 { 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( return await this.fileService.create(
data, data,