Extract filesize for all files

This commit is contained in:
rijkvanzanten
2020-08-13 13:28:06 -04:00
parent 3f0ae10085
commit 79d828699b

View File

@@ -68,6 +68,8 @@ export default class FilesService extends ItemsService {
await storage.disk(data.storage).put(payload.filename_disk, stream.pipe(pipeline));
} else {
await storage.disk(data.storage).put(payload.filename_disk, stream);
const { size } = await storage.disk(data.storage).getStat(payload.filename_disk);
payload.filesize = size;
}
// We do this in a service without accountability. Even if you don't have update permissions to the file,