Ensures that uri is a local file:// path suitable for RN FormData uploads.
If uri is already a local path, returns it as-is with a no-op cleanup.
If uri is an http/https URL, downloads it to the cache directory using the
file extension inferred from the URI (falling back to .m4a) and returns the
local path together with a cleanup function that deletes the temp file.
Parameters
uri: string
The audio URI (local file:// or remote https://).
filename: string
Base name (without extension) used for the temp cache file.
Ensures that
uriis a localfile://path suitable for RN FormData uploads.uriis already a local path, returns it as-is with a no-op cleanup.uriis an http/https URL, downloads it to the cache directory using the file extension inferred from the URI (falling back to.m4a) and returns the local path together with a cleanup function that deletes the temp file.