getFileStorageReferenceByName method
Get a FileStorageReference that reference a file with the original name
name
at the current CarpService storage location.
If more than one file with the same name exists, the first one is returned.
If no files with that name exists, null
is returned.
Implementation
Future<FileStorageReference?> getFileStorageReferenceByName(
String name) async {
final List<CarpFileResponse> files =
await queryFiles('original_name==$name');
return (files.isNotEmpty)
? FileStorageReference._(this, files[0].id)
: null;
}