How do you acces independent files from a multiple file loader

I’m trying to call a function where after the user uploads two pictures in the file_loader the first argument of the function is the 1st file uploaded and the second argument is the 2nd file uploaded.

Code Sample:

def file_loader_1_change(self, files, **event_args):
    """This method is called when a new file is loaded into this FileLoader"""
    
    # Call google colab function and transfers the two files
    dimension = anvil.server.call('send_dims', first_file_uploaded, second_file_uploaded)

Is there a way to access only the first file and then only the second file? This way I could assign the first file to file1, then assign the second file to file2 like this:

def file_loader_1_change(self, files, **event_args):
    """This method is called when a new file is loaded into this FileLoader"""

    file1= #method to call the first file
    file2= #method to call the second file

    # Call google colab function and transfers the two files
    dimension = anvil.server.call('send_dims', file1, file2)

A post was merged into an existing topic: Trying to get two file loaders to call one function form google collab