Fields required. I want to give two solutions to the user for giving a required information

Fields required. I want to give two solutions to the user for giving a required information

I want to give two types of solution to user for submitting a required information.

Like he can upload a file or write an URL where we can find the information.

At least one of both information has to be filled in to allow information submitting.

Example (pseudo code) : if URL_field/=null or upload_field/=null then submit=active....

I don't know how to program it...Someone can help me please??? Maybe I don't have to program it...

Thank you!