FileUpload in Jupyter Notebook not working after uploading a file

I am trying to create a Widget that allows user to Upload a MP4 file and by saving it, it will save the MP4 in a folder.

However, I noticed that the Save button works only if I did not upload any file but once I uploaded a file, the save button does not work anymore. This happens to running other cells as well, after uploading a file the other cells keeps running with no output.

Here is the codes:

import ipywidgets as widgets
from IPython.display import display
import os
import shutil
import asyncio

# Create a file uploader widget
file_upload = widgets.FileUpload(

# Create a button widget
save_button = widgets.Button(
    description="Save MP4",

def save_mp4(b):
    if file_upload.value:
        # Get the uploaded file
        uploaded_file = list(file_upload.value.values())[0]

        # Specify the destination folder to save the file
        destination_folder = './output/'

        # Create the destination folder if it doesn't exist
        if not os.path.exists(destination_folder):
        with open(os.path.join(destination_folder, uploaded_file['metadata']['name']), 'wb') as f:

        # Disable the file uploaded and update the button text
        file_upload.disabled = True
        save_button.description = "MP4 Saved!"
        print("Please upload an MP4 file first")


display(file_upload, save_button)

Does anybody knows why this is happening and how can i fix this issue? Thank you!