uploadMedia method

Future<MBMedia?> uploadMedia(
  1. String path
)

Uploads a media to the media center of MBurger

  • Parameters:
    • path: The path of the file that needs to be uploaded to the media center.
  • Returns a Future that completes with the media that has been created, if there has been an error it returns null.

Implementation

Future<MBMedia?> uploadMedia(String path) async {
  List<MBMedia> mediaUploaded = await uploadMediaList([path]);
  if (mediaUploaded.isNotEmpty) {
    return mediaUploaded.first;
  }
  return null;
}