moved ownedFile.type assignment

This commit is contained in:
Danny Coates 2018-02-02 10:15:17 -08:00
parent be498e0bd3
commit 1366f0b68e
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
2 changed files with 1 additions and 1 deletions

View File

@ -100,6 +100,7 @@ export default function(state, emitter) {
try {
metrics.startedUpload({ size, type });
const ownedFile = await sender.upload();
ownedFile.type = type;
state.storage.totalUploads += 1;
metrics.completedUpload(ownedFile);

View File

@ -86,7 +86,6 @@ export default class FileSender extends Nanobus {
url: `${result.url}#${secretKey}`,
name: this.file.name,
size: this.file.size,
type: this.file.type, //TODO 'click' ?
time: time,
speed: this.file.size / (time / 1000),
createdAt: Date.now(),