let filename = uri.substring(uri.lastIndexOf('/') + 1, uri.length())
@JohnRyanTsai I'm assuming you're asking this because you want to be able to upload files right? I'm confused why there is not a native method for this and we would need to use something like what @est7 suggested above.
Specifically regarding uploadFiles, I'm surprised that we have to pass the filename, and not just the file path, if the logic to deduce the filename is really that simple.
let filename = uri.substring(uri.lastIndexOf('/') + 1, uri.length())
let filename = uri.substring(uri.lastIndexOf('/') + 1, uri.length)
Most helpful comment
let filename = uri.substring(uri.lastIndexOf('/') + 1, uri.length())