18,372 questions
1131
votes
14
answers
981k
views
How do I measure request and response times at once using cURL?
I have a web service that receives data in JSON format, processes the data, and then returns the result to the requester.
I want to measure the request, response, and total time using cURL.
My ...
917
votes
38
answers
1.6m
views
Download single files from GitHub
What are some tips on downloading a single file from a GitHub repo?
I don't want the URL for displaying the raw file; in the case of binaries, there's nothing.
http://support.github.com/discussions/...
714
votes
25
answers
1.9m
views
How to trigger a file download when clicking an HTML button or JavaScript
This is crazy but I don't know how to do this, and because of how common the words are, it's hard to find what I need on search engines. I'm thinking this should be an easy one to answer.
I want a ...
661
votes
2
answers
1.2m
views
Do I need Content-Type: application/octet-stream for file download?
The HTTP standard says:
If this header [Content-Disposition: attachment] is used in a response
with the application/octet-stream content-type, the implied
suggestion is that the user agent ...
506
votes
26
answers
1.1m
views
Download a file asynchronously using Ajax
I have a Struts2 action in the server side for file downloading.
<action name="download" class="com.xxx.DownAction">
<result name="success" type="stream">
<param name="...
479
votes
24
answers
774k
views
How can I download and save a file from the Internet using Java?
There is an online file (such as http://www.example.com/information.asp) I need to grab and save to a directory. I know there are several methods for grabbing and reading online files (URLs) line-by-...
460
votes
16
answers
623k
views
Downloading a file from spring controllers
I have a requirement where I need to download a PDF from the website. The PDF needs to be generated within the code, which I thought would be a combination of a freemarker and a PDF generation ...
372
votes
18
answers
499k
views
Using HTML5/JavaScript to generate and save a file
I've been fiddling with WebGL lately, and have gotten a Collada reader working. Problem is it's pretty slow (Collada is a very verbose format), so I'm going to start converting files to a easier to ...
347
votes
9
answers
510k
views
Returning a file to View/Download in ASP.NET MVC
I'm encountering a problem sending files stored in a database back to the user in ASP.NET MVC. What I want is a view listing two links, one to view the file and let the mimetype sent to the browser ...
321
votes
10
answers
640k
views
JavaScript blob filename without link
How do you set the name of a blob file in JavaScript when force downloading it through window.location?
function newFile(data) {
var json = JSON.stringify(data);
var blob = new Blob([json], {...
286
votes
8
answers
275k
views
BitBucket - download source as ZIP
I know I can get the project through git clone command, but is there any way, how to download the project through the web interface from BitBucket.org?
In the best way, I am looking for a way to ...
263
votes
25
answers
169k
views
Is there a link to GitHub for downloading a file in the latest release of a repository?
Using GitHub's Release feature, it is possible to provide a link to download a specific version of the published software. However, every time a release is made, the gh-page also needs to be updated.
...
253
votes
20
answers
309k
views
Multiple simultaneous downloads using Wget?
I'm using wget to download website content, but wget downloads the files one by one.
How can I make wget download using 4 simultaneous connections?
233
votes
27
answers
821k
views
how to download file in react js
I receive file url as response from api. when user clicks on download button, the file should be downloaded without opening file preview in a new tab. How to achieve this in react js?
225
votes
20
answers
407k
views
Create a CSV File for a user in PHP
I have data in a MySQL database. I am sending the user a URL to get their data out as a CSV file.
I have the e-mailing of the link, MySQL query, etc. covered.
How can I, when they click the link, ...
218
votes
10
answers
650k
views
href image link download on click
I generate normal links like: <a href="/path/to/image"><img src="/path/to/image" /></a> in a web app.
When I click on the link, it displays the picture in a new page. If you want to ...
204
votes
10
answers
385k
views
Basic http file downloading and saving to disk in python?
I've been going through the Q&A on this site, for an answer to my question. However, I'm a beginner and I find it difficult to understand some of the solutions. I need a very basic solution.
Could ...
180
votes
9
answers
294k
views
How to use Python's pip to download and keep the zipped files for a package?
If I want to use the pip command to download a package (and its dependencies), but keep all of the zipped files that get downloaded (say, django-socialregistration.tar.gz) - is there a way to do that?
...
165
votes
16
answers
508k
views
How to open a download window without navigating away from the page
What is a cross-browser way to open a download dialog (let's assume we can set content-disposion:attachment in the headers) without navigating away from the current page or opening popups?
161
votes
5
answers
140k
views
How can I efficiently download a large file using Go?
Is there a way to download a large file using Go that will store the content directly into a file instead of storing it all in memory before writing it to a file? Because the file is so big, storing ...
155
votes
12
answers
617k
views
How to force file download with PHP
I want to require a file to be downloaded upon the user visiting a web page with PHP. I think it has something to do with file_get_contents, but am not sure how to execute it.
$url = "http://example....
146
votes
10
answers
342k
views
How to download image from URL
Is there a way to download an image directly from a url in c# if the url does not have an image format at the end of the link? Example of URL:
https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpf1/v/...
134
votes
10
answers
189k
views
Youtube_dl : ERROR : YouTube said: Unable to extract video data
I'm making a little graphic interface with Python 3 which should download a youtube video with its URL.
I used the youtube_dl module for that.
This is my code :
import youtube_dl # Youtube_dl is used ...
133
votes
20
answers
616k
views
Windows batch file file download from a URL
I am trying to download a file from a website (ex. http://www.example.com/package.zip) using a Windows batch file. I am getting an error code when I write the function below:
xcopy /E /Y "http://www....
133
votes
8
answers
298k
views
Convert array to CSV and force download
I'm trying to convert an array of products into a CSV file, but it doesn't seem to be going to plan. The CSV file is one long line, here is my code:
for($i=0;$i<count($prods);$i++) {
$sql = "...