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:
parent
2158df4228
commit
9f2097e788
1 changed files with 2 additions and 1 deletions
|
@ -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,
|
||||||
|
|
Loading…
Add table
Reference in a new issue