saveTo method
Saves the uploaded file to the specified path.
Creates or overwrites the file at the given path with the uploaded content.
Example:
await file.saveTo('uploads/${file.filename}');
Throws FileSystemException if the file cannot be written.
Implementation
Future<void> saveTo(String path) async {
await File(path).writeAsBytes(bytes);
}