moved ownedFile.type assignment
This commit is contained in:
parent
be498e0bd3
commit
1366f0b68e
@ -100,6 +100,7 @@ export default function(state, emitter) {
|
|||||||
try {
|
try {
|
||||||
metrics.startedUpload({ size, type });
|
metrics.startedUpload({ size, type });
|
||||||
const ownedFile = await sender.upload();
|
const ownedFile = await sender.upload();
|
||||||
|
ownedFile.type = type;
|
||||||
state.storage.totalUploads += 1;
|
state.storage.totalUploads += 1;
|
||||||
metrics.completedUpload(ownedFile);
|
metrics.completedUpload(ownedFile);
|
||||||
|
|
||||||
|
@ -86,7 +86,6 @@ export default class FileSender extends Nanobus {
|
|||||||
url: `${result.url}#${secretKey}`,
|
url: `${result.url}#${secretKey}`,
|
||||||
name: this.file.name,
|
name: this.file.name,
|
||||||
size: this.file.size,
|
size: this.file.size,
|
||||||
type: this.file.type, //TODO 'click' ?
|
|
||||||
time: time,
|
time: time,
|
||||||
speed: this.file.size / (time / 1000),
|
speed: this.file.size / (time / 1000),
|
||||||
createdAt: Date.now(),
|
createdAt: Date.now(),
|
||||||
|
Loading…
Reference in New Issue
Block a user