Fix mediamanager

it would also be better to use _.indexOf(data.file, 'local/') to ensure cross browser compability