Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1097505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:26:36+00:00 2026-05-17T00:26:36+00:00

Client is building a web based Digital Asset Management system. Here is the scenario:

  • 0

Client is building a web based Digital Asset Management system. Here is the scenario: We have a large file, say 100 MB or more. Client needs to track both when a download of that file is requested (easy) and then if that download was successful. The large file takes a while to download, so almost needs some kind of callback of when that file completes downloading to a machine.

In IE, you have the Open/Save/Cancel dialog box. If you have Chrome/FF, it’s a download manager. I’m not sure if there any events to tap into to find out if a file completes a download.

How would I do this without having some kind of ActiveX Control or Java applet that would report back if that file is successfully downloaded or not.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:26:36+00:00Added an answer on May 17, 2026 at 12:26 am

    This blog post is the answer to this question. The trick is downloading this file in packets of 1024, then confirming the total count. I was able to use this logic with a SharePoint feature when downloading files from a document library. I update a custom list when successful or failure of that download.

    http://www.codeproject.com/KB/aspnet/Download_Track.aspx

    //Dividing the data in 1024 bytes package
    int maxCount = (int)Math.Ceiling((FileName.Length - startBytes + 0.0) / 1024); 
    
    //Download in block of 1024 bytes
    int i;
    for(i=0; i < maxCount && Response.IsClientConnected; i++)
    {
        Response.BinaryWrite(_BinaryReader.ReadBytes(1024));
        Response.Flush(); 
    }
    

    Then we compare the number of data packets transferred with the total number of data packets which we calculated by dividing file length by 1024. If both the parameters are equal, that means that file transfer is successful and all the packets got transferred. If number of data packets transferred are less than the total number of data packets, that indicates there is some problem and the transfer was not complete.

    //compare packets transferred with total number of packets
    if (i < maxCount) return false;
    return true;  
    //Close the Binary reader and File stream in final block.
    
    
    //Close Binary reader and File stream
    _BinaryReader.Close();
    myFile.Close(); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.