Add database function to remember previous uploads