Questions tagged [download]

Receiving data to a local system from a remote system, or to initiate such a data transfer. Do not use this tag for question asking where to download off-site resource.

17009 questions
1084
votes
16 answers

Download a file with Android, and showing the progress in a ProgressDialog

I am trying to write a simple application that gets updated. For this I need a simple function that can download a file and show the current progress in a ProgressDialog. I know how to do the ProgressDialog, but I'm not sure how to display the…
Tom Leese
  • 17,977
  • 11
  • 41
  • 65
785
votes
14 answers

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 example request looks like: curl -X POST -d @file…
sdasdadas
  • 20,387
  • 19
  • 57
  • 135
713
votes
32 answers

Download single files from GitHub

I guess most of you, developers, use any VCS, and I hope some of you use Git. Do you have any tip or trick how to get a download URL for a single file in a repository? I don't want the URL for displaying the raw file; in case of binaries it's for…
Radek Simko
  • 13,346
  • 17
  • 65
  • 104
617
votes
5 answers

wget command to download a file and save as a different filename

I am downloading a file using the wget command. But when it downloads to my local machine, I want it to be saved as a different filename. For example: I am downloading a file from www.examplesite.com/textfile.txt I want to use wget to save the file…
noobcoder
  • 8,967
  • 8
  • 31
  • 54
521
votes
30 answers

How to download a file with Node.js (without using third-party libraries)?

How do I download a file with Node.js without using third-party libraries? I don't need anything special. I only want to download a file from a given URL, and then save it to a given directory.
greepow
  • 5,623
  • 4
  • 14
  • 8
508
votes
20 answers

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 simple file download, that would do the same as…
brentonstrine
  • 17,958
  • 23
  • 61
  • 112
478
votes
1 answer

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 should not display the response, but directly enter a…
Paul Draper
  • 64,883
  • 37
  • 172
  • 246
466
votes
6 answers

Download large file in python with requests

Requests is a really nice library. I'd like to use it for downloading big files (>1GB). The problem is it's not possible to keep whole file in memory; I need to read it in chunks. And this is a problem with the following code: import requests def…
Roman Podlinov
  • 19,179
  • 7
  • 37
  • 56
447
votes
25 answers

Download a file by jQuery.Ajax

I have a Struts2 action in the server side for file downloading. text/plain
hguser
  • 31,173
  • 49
  • 145
  • 269
442
votes
23 answers

How to download and save a file from 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-line, but is there a way to just download and save…
echoblaze
  • 10,126
  • 13
  • 41
  • 49
407
votes
14 answers

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 freemarker and a PDF generation framework like iText. Any better way? However, my main…
MilindaD
  • 6,733
  • 9
  • 37
  • 55
398
votes
28 answers

Download File Using Javascript/jQuery

I have a very similar requirement specified here. I need to have the user's browser start a download manually when $('a#someID').click(); But I cannot use the window.href method, since it replaces the current page contents with the file you're…
Mithun Sreedharan
  • 45,549
  • 69
  • 171
  • 232
371
votes
7 answers

Download a file from NodeJS Server using Express

How can I download a file that is in my server to my machine accessing a page in a nodeJS server? I'm using the ExpressJS and I've been trying this: app.get('/download', function(req, res){ var file = fs.readFileSync(__dirname +…
357
votes
12 answers

Download File to server from URL

Well, this one seems quite simple, and it is. All you have to do to download a file to your server is: file_put_contents("Tmpfile.zip", file_get_contents("http://someurl/file.zip")); Only there is one problem. What if you have a large file, like…
xaav
  • 7,348
  • 7
  • 27
  • 42
337
votes
17 answers

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 use format (probably JSON). I already have the code…
Toji
  • 31,923
  • 20
  • 95
  • 113
1
2 3
99 100