Get filename from Web Got Text

(SunnyTheDeveloper) #1

I just wanted to know name of a file from the user inputted url.
Lets imagine my app user enters a url and try to get filename then web got text block will be uses( i am not sure ).
Then how Web Got Text block will give me filename?

( ) #2

Did you try something like this? :arrow_heading_down::arrow_down:


(SunnyTheDeveloper) #3

The web got file downloads the file.I only want to get name.

(Cian) #4

The filename is part of the path where it is start, so while it downloads it, you also get the name of the file.

(SunnyTheDeveloper) #5

Can you show an example?
With some screenshots…

(Cian) #6

Just look at the label that @MrSid gave as an example. The filename is right there.

(SunnyTheDeveloper) #7

But that is not in Web got text block.

(Cian) #8

Ok I think there is an issue with what the original problem is.

Please post your blocks of what a user enters, how, and how you call the web function please.

(SunnyTheDeveloper) #9


(Cian) #10

I dont know what you are wanting. Are you just trying to parse the URL they enter?
Are you trying to intercept the file, are you trying to check for errors?

Fill in the details please.

Without knowing what you want, first thing is to setup a check for the responseCode. If it is not 200 then you throw an error that it is either an invalid URL or there is another problem.

(SunnyTheDeveloper) #11

I want to know the filename.
Like when you use download component there is a block for ‘save file as’.I just wanted to get original filename not a custom generated by some math or other blocks.

(Boban Stojmenovic) #12

Provide us with the url.


(SunnyTheDeveloper) #13

Suppose the url is this

Then the filename will be 5145f4faf5cb694627e921c78d41b4779c08c5e0.png.
How can I get it ?

Using block OnDownloadStart
(Boban Stojmenovic) #14



(SunnyTheDeveloper) #15

I will try this.

(Mohd Younis ) #16

how to get exact filename from webviewer

(SunnyTheDeveloper) #17

@Mohd_Younis_Developr Just use the same function.You get url from webviewer also.

(Mohd Younis ) #18

can you get exact filename in webviewer in this link