How to get the all the files(their file paths) in a folder from a web directory? - windows-store-apps

I'm trying to make a UWP file browser app that show all the files from http://192.168.201.254/media/, to do that I need to get all the file paths under http://192.168.201.254/media/, is there a way to do it?

Clients can only request known file URLs via HTTP.
The server can be configured to spit out an HTML file list as default page for the directory and you can process that on the client side.

Related

How to get address of a file on localhost?

I am trying to open a HTML file using localhost method.
Below are the two images. The URL shown there is generated
automatically by an extension.
Now, I want to find the same for any other file or folder on my PC (manually) how to do that ?

how do i open the index.html file instead of the file directory in a folder?

how do I get the index.html file to open when you go to file:///C:/Users/ONT%20Studios/Downloads/test/ i.e. can I make it so it doesn't show the directories but opens the index.html file?
You've tagged this .htaccess, which is a configuration file format for Apache HTTPD, but you aren't using Apache HTTPD or any other HTTP server.
You are just reading a local directory with your web browser.
Web browsers do not have features to load an index.html instead of showing a directory listing when you point them at a directory.
Use an HTTP server.

How to create link in HTML that download that file

I have http://192.168.230.237:20080 Server
file located on "/etc/Jay/log/jay.txt"
I tried with "http://192.168.230.237:20080/etc/Jay/log/jay.txt" this link gives me "404 NOT Found"
Here I can I link my file to link
Your HTTP server will have a configuration option somewhere (Apache HTTPD calls it DocumentRoot) which determines where http://example.com/ maps onto the filesystem of the computer.
Commonly this will be /var/www/.
Unless you change it to / (which would expose your entire filesystem over HTTP and is very much not recommended), you can't access arbitrary files on the computer.
/etc/ is used to store configuration information for software installed on the computer. It should almost never be exposed outside the computer.
The best solution to your problem is probably:
Look at the configuration of your HTTP server and identify the document root (e.g. /var/www/)
Move your website files to that directory
If you really want to expose files under /etc via HTTP then you could also change the document root.
Your webserver might also support features like Apache HTTPD's Alias directive which allows you to map a URL onto a file that can be outside the DocumentRoot.

wget --page-requisites locally?

I have a local HTML file referencing image and style data in various places in the local file system. I’d like to get a list of all referenced files; or alternatively a command that will copy the HTML files and all referenced files to some clear location (with or without changing the links in the HTML file), so that I can make a self-contained ZIP file of the HTML page.
It seems that wget provides good support for downloading an HTML file including all prerequisites (images, styles) using the --page-requisites flag. Unfortunately it does not support file:// URL.
What are my options here?
Why not setting up a local Apache server and serve it off localhost?
You can use EasyPHP, MAMP or other to set up easily a local Apache server.

AS3 - URLload local files with absoute path

I am trying to open local hard drive files inside AS3. I'm getting a security error with this code:
var soundFile:URLRequest = new URLRequest("c:\slushy.mp3");
Is it possible to URLload an absolute path on the hard drive?
Edit: so this appears to be a sandboxing issue. Drat. Is it possible to load the local file via PHP and send to flash?
PHP is a server language, so the final protocol is http.
The you must to acces by file:/// to the local file, but if you want to share the resources over Internet, you must upload your files to folder in the root of site.
By example: http://www.mysite.com/music
Then you can load the file:
var soundFile:URLRequest = new URLRequest("http://www.mysite.com/music/slushy.mp3");
Requisite: you must to create the directory "music" in server web application directory and upload the file.