upload function and Database file resource changed