Upload media
You can upload media in 2 ways:
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_IMAGE
let image2: UIImage = ANOTHER_IMAGE
// Upload a single image
MBAdmin.uploadMediaImage(image: image1,
name: "Image name",
success: { media in
}, failure: { error in
})
// Upload multiple images
MBAdmin.uploadMediaImages(images: [image1, image2],
names: ["Image1", "Image2"],
success: { media in
}, failure: { error in
})To upload files with their URLs:
Last updated
Was this helpful?