How do I get filename from resultURI?

i am a beginner and idk how to use the file extension, am i doing something wrong here?

This should work:
image

I replaced player1.source with activitystarter2.datauri, it gives an error that says this when i select an mp3 file:

image

the song still plays tho, just no song name

Sorry I misunderstood.
Replace DataUri with ResultUri.

now it has no error but label2 becomes blank from NIL when i choose a file

as in default is NIL but it becomes blank when i choose a file

Did i do something wrong? I want label 2 to show the name of the mp3 file i.e. name of song

use Do it to debug your blocks, see also tip 4 here https://puravidaapps.com/learn.php
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

I dont see a do it function on my blocks, even when i right click

You need to connect the ai companion first, then you have the 'do it' while right click

your extension,(the getfilename block) when given the resultURI, returns [*nothing*]
please fix, ty

Can you try with this extension?
http://sunnythedeveloper.epizy.com/2019/09/27/filetools-some-tools-to-work-with-files/

I already did, your extension works fine. I used it like this:

image


thanks for creating the extension!

1 Like