I have an image in the form of Data
obtained from firebase:
if let img = selectedPost.media[numberMedia + 1].image {
let data = (img.pngData() as Data?)!//here
I need to convert this value into a URL. How can I do that?
I have tried:
let imageUrl = URL(dataRepresentation: data, relativeTo: "https://URL")
but get
Cannot convert value of type 'String' to expected argument type 'URL?'