This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if let image = imageURL { | |
let url = URL(string: image) | |
URLSession.shared.dataTask(with: url!, completionHandler: { (data, response, error) in | |
if error != nil { | |
print(error!) | |
return | |
} | |
DispatchQueue.main.async { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function dataURItoBlob(dataURI) { | |
var BASE64_MARKER = ';base64,'; | |
var parts; | |
var contentType; | |
var raw; | |
if (dataURI.indexOf(BASE64_MARKER) === -1) { | |
parts = dataURI.split(','); | |
contentType = parts[0].split(':')[1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const firebaseConfig = { | |
apiKey: "API_KEY", | |
authDomain: "AUT_DOMAIN", | |
databaseURL: "DATABASE_URL", | |
projectId: "PROJECT_ID", | |
storageBucket: "STORAGE_BUCKET", | |
messagingSenderId: "SENDER_ID" | |
} |