Add middleware method to get a location to cache the updates

This will create a md device with UFS in case system dataset is not available.
Use get_upload_location everywhere!