Make search and upload work everywhere by sharing implementation