Uploading images, giving them names. In that case images will be converted in jpg (you can specify the compression quality).
Uploading files with their URL.
To upload an image or multiple images:
let image1: UIImage = AN_IMAGElet image2: UIImage = ANOTHER_IMAGE// Upload a single image MBAdmin.uploadMediaImage(image: image1, name:"Image name", success: { media in}, failure: { error in})// Upload multiple imagesMBAdmin.uploadMediaImages(images: [image1, image2], names: ["Image1", "Image2"], success: { media in}, failure: { error in})
To upload files with their URLs:
let file1Url: URL = AN_URLlet file2Url: URL = ANOTHER_URL// Upload a single fileMBAdmin.uploadMedia(media: file1Url, success: { media in }, failure: { error in })// Upload an array of filesMBAdmin.uploadMedia(media: [file1Url, file2Url], success: { media in }, failure: { error in })