I am currently developing a feature in a Game in C++.
I provide an URL (eg:"https://ServerName/../FolderName/").
There are few files in this folder: .png, .txt, etc.
I need to download all these files into a specific location (For the Game to fetch them from that location)
I am able to download single file by providing the complete URL.
Any idea on how to download all files in a single HTTP request??
Any help is appreciated. Thanks in advance!
An HTTP request is asking for a single resource from the server via a unique URI. What you're asking for is to be able to ask for multiple resources from the server with a single URI, which means you don't understand how HTTP works. So the answer to your question is NO, and it's impossible.
Related
On my php server I have a list of urls that point to large files (not locally stored). These files can be hundreds of Mb so I'm looking for the best way to add them to GCS without first saving them to my server. Is this possible or will I have to save each one then upload it to GCS?
Edit
I forgot to mention the list of urls that I have is managed programatically and changes often so any solution needs to be able to be implemented without manual interaction.
If your urls are publicly reachable, you may be interested in the Transfer Service provided by Google Cloud Storage. You can provide a TSV file with a list of urls from where your files will be uploaded to the bucket of your choice. You can have a look at the service doc here for further details.
I would like to write a program or script that will go through a website and download all MP3's. So for example, I would go to a website that has MP3's available for download. I would then run a script or start a program that would comb through the website downloading all or specified MP3's.
I don't know where to start or if an application already exists. Please help.
To download any resource from an HTTP protocol or from a website first, you have to know the url. To get the url you better have access to the code source and use a regex that start with http:// or https:// and end with .mp3. And/or follow any link in the source code and check if the mime type is audio/mp3.
Note: you can't go on a website and download any resource illegally. You have to respect the copyright.
I'm developing a Windows intranet application in C++ which needs to download a settings file from a predefined URL hosted on a webserver on the intranet.
This file would be updated every few weeks and I need to get it only if it has changed.
To avoid unnecessary downloads I wanted to know if there is a standard HTTP method to only request the hash of the file to the webserver to prevent a full download if the file has not changed.
I'm still in the design phase and the idea would be to use CURL library on the client to download the file and Apache as a webserver, but I'm also open to other solutions.
I want my customers to upload some file to my server. My current design is as below:
I make a folder on my server with R/W permission to Anonymous user like this: http://myserver/uploads
Customer contact my web service to indicate they want to upload something, and the webservice returned a path like this: http://myserver/uploads/xxx-xxx-xxx-xxx, the xxx part is a GUID.
But I don't know what to do next? I believe customer has the permission to write to the virtual path returned by the web service, but how could I write my client-side code so that it can actually copy things to that virtual path? My client-side is a Win32 application, not a web page.
What if I want the customer upload files within a web page, how to do that? I know that there's a "PUT" method in HTTP protocol that could be used to upload things to server, but how to use that?
I am new to this kind of web development. I hope I made myself clear. If there's any better design, please let me know.
Many many thanks.
Update - 1 - 0:59 2010/12/27
A similar question: How to upload a file to a WCF Service?
Some possible solutions:
Image Upload Web Service in C#.NET
Upload any type of File through a C# Web Service
Progress Indication while Uploading/Downloading Files using WCF
I would avoid allowing anyone to write files to a directory. I know you have set up permissions to help guard against anything bad happening, but it is still setup to where anyone can read/write to it, not just to person you've told the URL to. Security through obscurity is not a best practice.
What kind of webservice are you using? WCF, SOAP, something else all together? I would have the file upload still be a service call (not just some PUT command to a directory). That way you can still apply security if needed. When you get right down to it, a file is nothing more than an array of bytes, so you can have your web service accept an array of bytes and write it out to the correct location. If I had a better idea of what technologies you are using (php, asp.net, jsp, etc) Then I might be able to make more precise recommendations.
HTH
You can use SOAP attachments, or if not using SOAP, something similar - specifying filename, content type and binary data, Base64-encoded.
I have a questions, and I would love you to try to answer it.
Is it possible to get the list of files from a remote folder in java, knowing just the URL???
for example:
http://localhost/img get all the images names in this directory.
Thanks in advance
When you are talking about a remote folder, it depends on how you are accessing it.
If it is via a network share, such as \localhost\mypath AND you have access to browse the files, you will be able to do so, just like you would with a local directory.
However, if you are trying to browse a directory on a web server, the web server would have to give you directory browsing ability for you to work with it.