Skip to content

Commit

Permalink
[PB-557] bug: file size from the drive-server comes as string
Browse files Browse the repository at this point in the history
  • Loading branch information
edisonjpadilla committed Sep 21, 2023
1 parent f07f499 commit 3c33821
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/models/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ export default (database: Sequelize): FileModel => {
},
size: {
type: DataTypes.BIGINT.UNSIGNED,
get(): number {
const rawValue = this.getDataValue('size');
return typeof rawValue === 'number' ? rawValue : parseInt(rawValue);
}
},
bucket: {
type: DataTypes.STRING(24),
Expand Down

0 comments on commit 3c33821

Please sign in to comment.