uploadFromString method
Uploads a file from a fileUrl string to path and returns the
public download URL.
Useful for uploading files accessible via a local URI or a string path.
Throws FirebaseException on failure — handle in the provider/caller.
Implementation
Future<String> uploadFromString({
required String path,
required String fileUrl,
PutStringFormat format = PutStringFormat.raw,
SettableMetadata? metadata,
}) async {
final UploadTask task = _ref(
path,
).putString(fileUrl, format: format, metadata: metadata);
final TaskSnapshot snapshot = await task;
return await snapshot.ref.getDownloadURL();
}