Use below code to download content with more than 2 GB
long length = fileObj.length();
if (length <= Integer.MAX_VALUE)
{
response.setContentLength((int)length);
}
else
{
response.addHeader("Content-Length", Long.toString(length));
}
long length = fileObj.length();
if (length <= Integer.MAX_VALUE)
{
response.setContentLength((int)length);
}
else
{
response.addHeader("Content-Length", Long.toString(length));
}
No comments:
Post a Comment