diff --git a/backend/model/threading/MetadataLoader.ts b/backend/model/threading/MetadataLoader.ts index 16e506e0..abc0849d 100644 --- a/backend/model/threading/MetadataLoader.ts +++ b/backend/model/threading/MetadataLoader.ts @@ -81,6 +81,7 @@ export class MetadataLoader { try { const stat = fs.statSync(fullPath); + console.log(stat); metadata.fileSize = stat.size; metadata.creationDate = stat.ctime.getTime(); } catch (err) { diff --git a/test/backend/unit/model/threading/MetaDataLoader.spec.ts b/test/backend/unit/model/threading/MetaDataLoader.spec.ts index da83d589..a5ddaf57 100644 --- a/test/backend/unit/model/threading/MetaDataLoader.spec.ts +++ b/test/backend/unit/model/threading/MetaDataLoader.spec.ts @@ -7,8 +7,8 @@ describe('MetadataLoader', () => { it('should load png', async () => { const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../assets/test_png.png')); + delete data.creationDate; // creation time for png not supported expect(Utils.clone(data)).to.be.deep.equal(Utils.clone({ - creationDate: 1545435746672, fileSize: 2155, orientation: 1, size: {