Hi all,
I'm using Filestream for read big file (> 500 MB) and I get the OutOfMemoryException.
Any solutions about it.
My Code is:
using (var fs3 = new FileStream(filePath2, FileMode.Open, FileAccess.Read))
{
byte[] b2 = ReadFully(fs3, 1024);
}
public static byte[] ReadFully(Stre...
I have a URL that opens a PDF:
<cfoutput>http://myUrl.cfm?params=#many#<cfoutput>
I would like to enable my users to download that PDF instead of having it open in the browser. I've been trying the following, and it isn't working:
<cfoutput>
<cfcontent type="application/pdf" file="http://myUrl.cfm?params=#many#"/>
<cfhe...
Hello,
I'm creating a java web application runing on a Tomcat server.
One of the functions fill in a StringBuffer variable with data.
At the end, I would like to propose the user to download the generated content packaged in a text file. This without having to store the file on the server.
I've been searching for a code snippet but c...
I have an Excel file on the server side. How I can display it on client side browser using servlets?
Thanks in advance.
...
Finally found out how to achieve this!
Turned out it is as simple as enabling xsendfile and setting header parameter Accept-Range
Read my answer below
(by the way, in the block quote below I wrote a common pitfall newbies - like I did - made. We tend to think it should be manually programmed)
URL must be something like:
mysite.c...
I have a PHP script being served over https:// that is trying to push a PDF file to the user. The problem that in Internet Explorer 6 (which unfortunately I still have to support) is not obeying the filename being set in the header. FireFox and IE7 are both working properly.
The file name keeps coming out as a random name with the c...
Hi I've tried two different techniques for sending a file to a browser(making the user download a file). I've tried an example from myfaces wikipage
FacesContext context = FacesContext.getCurrentInstance();
HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
int read = 0;
byte[] b...
I need to provide downloads of large files (upwards of 2 GB) on an ASP.net website. It has been some time since I've done something like this (I've been in the thick-client world for awhile now), and was wondering on current best practices for this. Ideally, I would like:
To be able to track download statistics: # of downloads is essen...
In a basic HTML web page, how do you make the user have to enter a username and password before they are allowed to download a file.
What is the best way of achieving this on a website, preferably in plain HTML.
...
Hello
I use the directory listing function in IIS to upload a bunch of files for friends and family to easy access and download.
My problem is that .mkv files it lists but when you click it i get a 'The page cannot be found'.
Ive tried relocating the file and renaming it but i get the same error each time. Why does it do this? Its onl...
I have seen many websites triggering a file save-as dialog on a page with existing HTML content. How do they do this?
I know about setting the right headers such as Content-disposition etc. but when I do that, the content of the page does not load, and immediately the file download is triggered...
...
Hello Guys
I am creating a simple project that will allow me to upload and download files using gwt. i am having trouble with the downloading of files that are on my server.
For the file upload i used http://code.google.com/p/gwtupload/ and followed the instructions there. My file is stored on the server outside of the website contai...
While setting up an online file management system, and now I have hit a block.
I am trying to push the file to the client using this modified version of readfile:
function readfile_chunked($filename,$retbytes=true) {
$chunksize = 1*(1024*1024); // how many bytes per chunk
$buffer = '';
$cnt =0;
// $handle = fopen($filen...
I have a Silverlight application that implements some basic CRUD operations on a fairly flat data set. The application loads all the data onto the client to allow for quick editing (this is a fairly small data set no more that a couple K). I would like to allow them to download the file as a CSV so they can edit the data locally.
I kn...
Hi,
I'm new and just developing on J2EE.
I am modifying an existing application (an OpenSource project).
I need to save an image on a client sent by the server, but I do not know how.
This activity must be done in a transparent manner without affecting the existing operation of the application.
From the tests done I get this error:
java...
I have to download a file and I'm using this code, which is basically an AsyncTask that is meant to update a progress bar. But, since I don't know what's the file size I've been having to use the spinner progress bar. So, how can I get the file size before start downloading it so that I can use a normal progress bar?
...
I am currently with HostGator on a shared hosting plan. I have a new website I'm trying to setup with a download.php script. The issue I am having is that, while someone is "downloading" a file through the download.php script, it counts as a "process" and my hosting plan limits the processes that can be running at the same time to 25 at ...
I have to process a file everyday. This file is sent to my Email once everyday. If I can get to this email once every day and download the attachment, that had be awesome. Is it even remotely possible to do such a thing?
Thanks!
...
I am working on internet explorer automation and part of it involves downloading files from a site whcih is hosted on asp 2.0 and uses forms based authentication, so to create end to end automation i used browser automation.
I was able to reach to the step where i can get to click on a URL which brings the "File Download" dialog of the ...
How do I check if the user accepted a file download in JavaScript. Example: If the site pops up a download link, and the web browser asks the user to download the file, how do I determine on that page if the user accepted the download or not?
...