[MGNLDAM-1008] Display appropriate size for bigger image Created: 11/Jan/22  Updated: 26/Aug/22

Status: Open
Project: Magnolia DAM Module
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Yen Lac Tue Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 0.25h
Original Estimate: Not Specified

Attachments: PNG File asset_detail.png     PNG File page_image.png    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Epic Link: AuthorX improvements
Team: AuthorX

 Description   

I think it would be good, for bigger images, to display MB instead of KB.

This code we use in the subscription service ui, although it is in typescript, might help -> https://git.magnolia-cms.com/projects/CLOUD/repos/subscription-service-ui/browse/src/app/page/subscription-info/metric/component/metric-value/metric-value.component.ts#30

Should make change in two places:
1. Create a page with Basic template, then select component "Text and Image", try to upload an image

 

2. In Asset app, select to view an asset detail

Expected result:

Display size in MB for big image instead of KB

 

Dev notes:

info.magnolia.dam.app.field.link.DamItemPreviewComponent#getFileInfo

info.magnolia.ui.field.UploadFieldDetailComponent#getFormattedSizeInfo


Generated at Mon Feb 12 05:05:28 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.