Created
October 1, 2022 10:11
-
-
Save RaheemJnr/c0537aecbe6d48bd010e54ab97162a16 to your computer and use it in GitHub Desktop.
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
fun getUploadedFileUrl( | |
fileKey: String | |
): String { | |
var url: URL? = null | |
Amplify.Storage.getUrl( | |
fileKey, | |
{ | |
Log.i("Amplify", "Url Successfully generated: ${it.url}") | |
url = it.url | |
}, | |
{ | |
Log.e("Amplify", "URL generation failure", it) | |
} | |
) | |
return url.toString() | |
} | |
fun getCurrentTimeMillis(): Long { | |
return System.currentTimeMillis() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment