The frontend used to look at the file directly, but that's obviously not the right thing to do. Expose it on the backend and use that function instead.