file-download

can I download a file over http that have a space in the name? (ruby)

there is a space after the word Part in the file name I want to download. It looks like http.get doesn't pass the url_path correctly because you can download the file from the browser without any troubles. any suggestion how I can download a file if there is a space in the file name? require 'net/http' url = "http://www.onalllevels.co...

Get file size before downloading & counting how much already downloaded (http+ruby)

Can anybody help me to get the file size before I start downloading display how much % was already downloaded . require 'net/http' require 'uri' url = "http://www.onalllevels.com/2009-12-02TheYangShow_Squidoo_Part 1.flv" url_base = url.split('/')[2] url_path = '/'+url.split('/')[3..-1].join('/') Net::HTTP.start(url_base) do |htt...

Download a File - iPhone SDK

Hello everybody, I am sort of new to developing view-based iPhone applications, and I need to download this "txt" file off the internet and save it into the documents folder of the app. Can anyone show me simply how I can do this? The txt file is of a tiny size, so I wouldn't need any User interface objects... Thanks, Kevin ...

Firefox sporadically displays file stream instead of a document.

When user requests to download a document, I'm writing out a PDF file to HttpResponse using HttpResponse.OutputStream.Write method. It works in every browser except Firefox(3.5.8). In Firefox it sometimes displays the file and sometimes it displays the actual byte stream. When it displays a byte stream, http response is never finished. ...

Post Back does not work after writing files to response in ASP.NET

What I have? I have a ASP.NET page which allows the user to download file a on a button click. User can select the file he wants from a list of available files (RadioButtonList) and clicks on download button to download it. (I should not provide link for each file that can be downloaded - this is the requirement). What I want? I want ...

Streaming a File with .NET - Client Connection Time?

So I asked a question a while back about securing downloads using C# (http://stackoverflow.com/questions/2178984/securing-large-downloads-using-c-and-iis-7) and I got some great advice on how to do it (involving reading the file into memory and then writing it to the user). The only problem is, now that I'm trying to implement some basic...

Download multiple files with a single action

I am not sure if this is possible using standard web technologies. I want the user to be able to download multiple files in a single action. That is click check boxes next to the files, and then get all the files that were checked. Is it possible - if so what basic strategy do you recommend. I know I can use comets technology to create...

how do i prevent public downloads of files using php?

Hi, i have a script that allows only authorised users to upload files to a certain folder. however i do not know how to prevent people from downloading freely without login. I need the solution in php. I have googled around but nothing straight forward as yet. currently in my document root i have a folder called admin and a subfol...

How to protect website resource from downloading?

Like this .mp3,you can listen online: http://d1.s.hjfile.cn/podcast/20100222/2010022290717093_217.mp3 But I don't want to allow downloading. How to approach that? ...

fpassthru problem in PHP5

My web host has a "process killer" which terminates any process running longer than about 5 minutes, so my download script can't run for that long. I thought I'd use fread-print for a few seconds, just to catch if the user aborts the download initially and then use fpassthru to to dump the rest of the file. ob_end_clean(); $file = fope...

Should I set the Cache-Control header when serving up files? Or not?

I'm serving up some files via an HTTPModule in asp.net. I want to know if there are any benefits to setting, or not setting, the Cache-Control header to something (like no-cache)? Edit: The reason I'm curious about this is because we ran in to a problem where serving up office documents over an SSL session in IE results in an error (wi...

how do I setup a site for customers to download video or txt/pdf files after paying or becoming a member?

I have a customer who would like to do the following on his site: Have people sign up as members of his fitness services and get access to free downloads of pdf/txt files. If a customer pays by Paypal, they would be able to download a video of an exercise routine. Any applications/methods/techniques that can accomplish this? ...

Ruby on rails: Image downloads with Authentication/Authorization/Time outs

Hi Guys, I'm having few doubts on implementing file downloads. I'm creating an app where I use attachment_fu with Amazon s3 to upload files. Things are working pretty well so far on uploading side. Now its the time to start the file downloads. Here is what I need, a logged in user search and browse for Images and they should able to add ...

I want to know when a file is done downloading

Possible Duplicate: how to know when download is finished Hi, I have a file which I want users to download only once. After it's done downloading, the file is no longer available. Outside of setting up a streaming system, is there any way I can set some sort of callback up to say the file is done downloading on the client's...

VB.Net: How to fill in a form in a website, then click at a button and download the file using webbrowser control?

I am using a WebBrowser-Control to fill in a webform and then click at a button, this currently results in a standard Download File Dialog (you get these if you download a file using internet explorer), but instead, I have to catch this file and save it automatically with a by me defined name to a specific folder. I am trying to code a ...

Download binary without triggering onbeforeunload

I want to kick off a file download for a user when he clicks a link, but I have an onbeforeunload handler that I don't want to get invoked when the download begins. To downloads, I currently have an <a> with the href set to the file location but clicking it results in onbeforeunload being invoked in Chrome (not in FF, though). I know I...

Dynamically created iframe used to download file triggers onload with firebug but not without

EDIT: as this problem is now "solved" to the point of working, I am looking to have the information on why. For the fix, see my comment below. I have an web application which repeatedly downloads wav files dynamically (after a timeout or as instructed by the user) into an iframe in order to trigger the a default audio player to play th...

ASP.NET Create zip file for download: the compressed zipped folder is invalid or corrupted

string fileName = "test.zip"; string path = "c:\\temp\\"; string fullPath = path + fileName; FileInfo file = new FileInfo(fullPath); Response.Clear(); Response.ClearContent(); Response.ClearHeaders(); Response.Buffer = true; Response.AppendHeader("content-dispositio...

.exe File becomes corrupted when downloaded from server

Firstly: I'm a lowly web designer who knows just enough PHP to be dangerous and just enough about server administration to be, well, nothing. I probably won't understand you unless you're very clear! The setup: I've set up a website where the client uploads files to a specific directory, and those files are made available, through ph...

downloaded zip file returns zero has 0 bytes as size

I have written a Java web application that allows a user to download files from a server. These files are quite large and so are zipped together before download. It works like this: 1. The user gets a list of files that match his/her criteria 2. If the user likes a file and wants to download he/she selects it by checking a checkbox 3. ...