Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
dafnis14
Specialist
Specialist

Loading file names from URL

Hi,

Mu app loads images from URL based on a string that I build in script for each item:

https://ccc.com/images/upload/products/new-products/3/XXX.jpg

While a URL is defined for each item, not all items have images yet.

I would like to retrieve the existing file names so I can add a filter for the user to select only items that have images.

How can I load the files or their names from the URL?

Thanks!

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

There is no built in way to iterate over files in a http location. Does that url supply a directory if you query at a higher level? eg https://ccc.com/images/upload/products/new-products/3/

If so, use this URL to get the directory, parse the content and load the relevant images.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
dafnis14
Specialist
Specialist
Author

Hi Jonathan,

When I try to access the link of directory, I get the following error:

You don't have permission to access /images/upload/products/new-products/3/ on this server.


Assuming there are permissions, how can I query and parse the content?

Thank you!

jonathandienst
Partner - Champion III
Partner - Champion III

That normally means that there is no directory. There is no standard governs how the directory appears. If its text, you can load as a text source. Otherwise, use and XML load to load from the web page.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
dafnis14
Specialist
Specialist
Author

Hi Jonathan,

Thanks for clarifying.

I would recommend the customer to flag an item with an image in their ERP and I'll use this field for filtering.

Looks to me much easier to handle...:-)