HUNG
HUNG

Reputation: 535

How to change file size unit in media library in Sitecore

I am currently using Sitecore 6.6. I wonder how to override the display unit from byte to megabyte?

Does it need to change the xml here sitecore\shell\Applications\Files and what class should be overwrote?

enter image description here

Upvotes: 0

Views: 405

Answers (1)

Maulik Darji
Maulik Darji

Reputation: 130

I would suggest not to make any change in this as it is out of the box from Sitecore.

If you still want it for a very specific purpose like your Site Manager (Person who add/edit the content of the Site) to see the size in MB or KB then you may add some custom code.

  • Add a field in the Template
  • Write a Pipeline and add it in uiUpload in Sitecore.config. This Pipeline should count the size of the uploaded file and then convert it in KBs or MBs as you desired.

Upvotes: 1

Related Questions