store method

Future<String> store({
  1. required String path,
  2. required String filename,
})

this function will store the file in your project storage folder

RequestFile image = req.input('image');
String filename = await image.store();

Implementation

Future<String> store({required String path, required String filename}) async {
  path = path.endsWith("/") ? path : "$path/";
  return Storage.put(path, filename, await bytes);
}