12 megabytes are the size of the file. In English, sizes are measured. Some measurements, like weight, happen to have a special verb attached to them, derived from the measurement process. "This potato weighs 200 grams" means that, when you weigh the potato, the output of the measuring process is 200 grams.
We have never created a special word for the measuring process of information. Maybe information theorists have one, but it has never made it into common culture. So, if you insist on using a verb, you cannot go more specific than
This file measures 12 megabytes.
As others have noted, this is not typical usage. Nobody thinks of measuring a file as a process, because the information about the measurement is available without any action on our part. So we simply use the contraction
This file['s size] is 12 megabytes.
And that's all there is to it.
Sometimes the word you are looking for doesn't exist, because nobody needs it.