1. upload resources.