Migrating download functionality to store.js