strict warning: Only variables should be assigned by reference in /home/itechpros/ on line 1434.

Get the File Size of Data Stored in a Media Field

Allows you to get the files size of data stored in a media/blob column without writing to disc.

var image = plugins.images.getImage( //pass in the Media Field you want to get the size of
var bytes = image.getData() 
return bytes.length; //convert to KB or MB if you need