file-download

How can I let the user download the HTML-file?

I would like to create an Invoice in HTML instead of a PDF-file. And I would like to let the user easyli download the HTML-file via a link. How can I do this? If I simply link to the HTML file, it is only "temporarily downloaded" and view in the users web browser. I would like the same effect as when the user download a .zip-file or sim...

Call MVC file download action method from jQuery

If I have the following MVC Action: [AcceptVerbs(HttpVerbs.Post)] public ActionResult GetDocument(int id, string fileName) { // ..... // return File(fileStream, "text/plain", fileName); } I want to call the action on a click of a table row using jQuery. But I'm a bit confused, because I don't think I want an Ajax call here do...

GWT: Sending PDF document from server to client

Hi! I have an RPC service and one of the method is generating a report using Pentaho Reporting Engine. Report is an PDF file. What I'd like to do, is when user request a report, the report is sent back to him and save dialog or sth pops up. I tried this inside my service method: Resource res = manager.createDirectly(new URL(reportUrl), ...

ASP.NET MVC how can I return an error from a file download action without leaving the current page?

I am calling a file download action from javascript: $elem.click(function() { window.location.href = 'MyController/MyFileDownloadAction'; }); The controller returns a file: [AcceptVerbs(HttpVerbs.Post)] public ActionResult MyFileDownloadAction() { /* do some processing, generate an in-memory file... */ return File(myFil...

File downlods from temp internet file - Should download from actual folder.

Hi, I have written a code in asp.net 2.0 to allow the user to download an Excel file. Before downloading the excel i have made some changes to the file. When i try to download the excel using the below code Response.TransmitFile(Server.MapPath("~/Excel Files/Data.xls")); But each time when the user downloads the file the file is do...

PHP script for downloading files with utf-8 characters in the names

Hi, I have files named in foreign characters, that I have uploaded after encoding the names using utf8_encode(). But now, when I m trying to download them using readfile(), they give "not found" errors. I have pasted the code below. I think the problem lies with some header I have defined. Can anyone tell me what's the problem? ======...

Getting a 2GB file inside PHP?

I am needing to download a very large file via PHP, the last time I did it manually via http it was 2.2gb in size and took a few hours to download. I would like to automate the download somehow. Previously I have used file_put_contents($filename, file_get_contents($url)); Will this be ok for such a large file? I will want to untar th...

Downloading File from remote server using php script without fopen

Hi, Scenario : I have a c# .net web page. I want the user to be able to download a file placed on a remote server from a link on my page. However while downloading there should be minimum load on my server. Hence i tried creating a HttpWebRequest instance, passed the download.php path e.g. HttpWebRequest myHttpWebRequest = (HttpWebRe...

how to generate download-site using maven

Hi, I am new to Maven and trying to accomplish a simple task: build jar package and web site [DONE] deploy them to remote server via scp [DONE] the site should contain download page with links to the deployed jar files [MISSING] I do not want to use archiva or similar tools. I just want to have a (static, generated) page on the web s...

Downloading files from the server to the local machine in ASP .NET

In my application I have a requirement where the client/user needs to download video files from the server to their local machine. I have to do this using ASP .NET - can anyone help me by providing some ideas, coding to implement this. ...

PHP Force Download file corrupt

Hi, I am using this PHP script to download a file: $status=stripos($_SERVER['HTTP_REFERER'],'servername'); if($status===false) { header('Location:http://xyz.com); } else { header('Content-disposition: attachment; filename=XXX.pdf'); header('Content-type: application/pdf'); readfile('http://www.xyz.com/Downloads/XXX.pdf)...

unable to download dynamically created file.

Hi! I've created a custom Action Result in my MVC application, where I generate a CSV file according to the configuration that the user provides. However. The problem I have now is that if I create a download link like this: <a ID="lnkDownload" href="<%= Url.Action("DownloadFile", "Download", new { id = Model.Id, userId = Model.userI...

Is there a way to allow users of my site to download large volumes of image files from Amazon S3 via Flash / PHP / other service?

Hi all, My website allows users to upload photographs which I store on Amazon's S3. I store the original upload as well as an optimized image and a thumbnail. I want to allow users to be able to export all of their original versions when their subscription expires. So I am thinking the following problems arise Could be a large volume ...

file downloader with php to webpage

Hi! I develop an webpage and I would like to create an download section. I have an php code to download files, but I have tried it for many times, but it doesn't work. I see continuesly the error message, but the picture.jpg file is in the same directory than the download.php and the index.php. I don't know what the problem is. The con...

OutOfMemoryException when send big file 500MB using FileStream ASPNET

I'm using Filestream for read big file (> 500 MB) and I get the OutOfMemoryException. I use Asp.net , .net 3.5, win2003, iis 6.0 I want this in my app: Read DATA from Oracle Uncompress file using FileStream and BZip2 Read file uncompressed and send it to asp.net page for download. When I read file from disk, Fails !!! and get Ou...

URLDownloadToFile and Authentication

Hi I'm working on some old ATL OCX, that is used as "download manager". It downloads files using URLDownloadToFile API. Previously, it was hosted as ActiveX on web page so in case the server required authentication it was done by IE. Now it is part of executable, so it should take care of authentication. Let say user provided username...

Is it possible to download multiple files from a remote location to a users hard drive with AS3 FileReference?

Can I develop a Flash AS3 download swf that will let a user select a location on their hard drive to download files to and then start the download of multiple files (in the same way I can do with upload)? Or should I zip all the multiple files first and download zipped files to local disk. My users will want to download potentially hun...

C# http download with large files (300 Mb) stops after a few minutes (after 80 Mb)

I use the following code to send a .zip file to a customer, it works great for files around 60-80 Mb but when I try with larger files (300 Mb) customers report that the browser (both IE and FFX) just stops download progress after a few minutes (around (80Mb)) and nothing more happens. I wonder if there could be a setup issue with IIS th...

Downloading from rapidshare as premium user?

I'm creating a simple download manager in java and I want to be able to download files from rapidshare as a premium user. I checked their API, but that didn't make me any wiser. I found this class in C, but I have no idea how use it with my downloader. public void Download() { try { URL url = new URL(this.FileLink); // Copy...

something better than httrack to download files?

Hey, I am trying to download documents (pdf, tiff, images) from webpages that have javascript and frames in them. example: http://127.0.0.1/web/guest/en/websys/webArch/mainFrame.cgi 'httrack --get-files' didn't download any, are there other ways you may think of? another program? will I have to write that program myself? Thanks a lot!...