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:
parent
2158df4228
commit
9f2097e788
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user