@Alshurafa - it all depends on how you are giving the exam.
If the exam is through using Canvas Quizzes, then I would recommend the following (if you want them to have only 2 hours for taking the quiz and then 1 hour for uploading).
First, if the uploading part is just proof of the work done on the first part, I would give them 10 minutes or so for upload time - you did not provide enough information to correctly address that point.
If you want a certain amount of time for the exam and then another set of time for the submission, I would set up a module (i.e. final exam). Then add a canvas quiz for the exam to that module and another quiz for the upload (note only if using classic quizzes - if you are using new quizzes, then you will want to add an assignment for the upload). With classic quizzes, your file upload question(no file type restriction possible) can be bulk downloaded for all students. With New quizzes that bulk download is not available. Using an assignment does not have a time limit capability, but it will allow restriction of upload type. In order to enforce a time limit on the submission through an assignment you specify in the instructions that the submission must be within X minutes of submitting the canvas quiz.
The way to enforce the time restrictions is the use of the module. In the module you edit it and select the option for students to go through the items in order - put the canvas quiz first in the module followed by the submission assignment/quiz. Then select that the first quiz(your exam) must be submitted before the students can get to the upload assignment/quiz. Then you can manually look at the submitted time and the upload time between the two assignments to make sure they are within X minutes.
There is a way to check the time differences using some information available from Canvas and Excel, but that is too difficult to explain here.
The above may help or it may confuse.