I am getting a different file name from Flutterflow when uploading the file and extracting the name

Widgets & Design

Hello, I am using the following code to obtain the file name from an uploaded file in Flutterflow:

// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/backend/supabase/supabase.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

Future<String> getFileName(FFUploadedFile file) async {
  // Log the file object properties
  debugPrint('File object: $file');
  debugPrint('File name: ${file.name}');
  return file.name ?? 'Unknown Filename';
}

Let's say the file I upload is called image_1.png . Instead of getting that as a name, I am getting a number that seems to be generated from Flutterflow, e.g. 123123442342342.png . Is there a way to get the original file name???

What have you tried so far?

Tried implementing it

Did you check FlutterFlow's Documentation for this topic?
Yes
1 reply