Issue #2990896 by phenaproxima, effulgentsia, seanB, xjm: Move Media::save() logic into storage handler to prevent data integrity issues when media items with remote content are saved (cherry picked from commit 1e7b231b)