Avatar of Member_2_5069294
Member_2_5069294
 asked on

How would I list files via HTTP?

I'm working on an application that shows images (amongst doing many other things).  The target audience is developers working as a team across a network.  I'd like to offer them the ability to work via the internet.  The program would show a list of their Bookmarks/Favourites, they click on one of these and the program would display the compatible files available via HTTP from that site.  I've already done something similar with FTP.  The target platform is Windows.

After reading through the HTTP specification I can't find a way to do this.  I don't see a way to get a list of files of a particular type (something like GET *.jpg).  There are options in the request header for matching but these appear to define wether the resource is transfered or not, something like requesting 'get bricks.jpg if its a jpg'.

Am I misunderstanding the options in the header?  I can't find any example of this being done or how the results would be returned.
File Sharing SoftwareWeb Languages and StandardsInternet Protocols

Avatar of undefined
Last Comment
Member_2_5069294

8/22/2022 - Mon
tetrasodium

I don't think http itself allows getting an index of only certain types of files.  It's fairly simple to restrict the types of files you want in the directory listing, but that would be for every request rather than whatever the user is looking for.  The best way would probably be to stick a little php/asp/perl script in the directory that will grab the filtered contents of the directory and spit it out in a format you like using a simple GET request to define the filtering.
Member_2_5069294

ASKER
I suspected that.  I was hoping someone who knew the protocol better than me would prove me wrong.  The script idea would be a nice solution, except it seems unlikely that the program will have write access to the server.

When you say "It's fairly simple to restrict the types of files you want in the directory listing" does that mean there is a way to list the files in a directory via HTTP?  That would be a decent solution, I can easily do the filtering myself if I could only get some filenames.
ASKER CERTIFIED SOLUTION
tetrasodium

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Member_2_5069294

ASKER
While this isn't the answer I was hoping for, I think it's the best answer it's possible to give.  The answer is clear and addresses the question effectively.  Thanks.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Member_2_5069294

ASKER
I tried this on a few sites that I thought people might use to serve data.  The results were inconsistent as far as index pages go.  However, I think anyone serious about working this way might set up a private server.

Parsing IMG tags out of HTML appears to be the best answer available (possibly the only one).  At least something is likely to show whether they set up an index page or not.  If I'm parsing the HTML, I could get the links and show them in the same way as FTP folders.  If they point to an image (as in the example above) I can just show that.