strict warning: Only variables should be assigned by reference in /home/itechpros/servoyguy.com/sites/all/modules/links/links.inc 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(forms.movies.movie) //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