Sort files before choosing one to upload