Pages

Friday 8 February 2019

CelerFT - Uploading gigabit sized file in chunks with resume

CelerFT - Uploading gigabit sized file in chunks with resume


From time to time persons have reached out to me in relation to the Gigabit File upload articles, and one of  the things that I have been asked about is how to resume a file upload. In response to that question  I have been working on an update to the Gigabit File upload project and I have added it to my GitHub Repository,

This version is a complete rewrite of the Gigabit File upload project and the aim was to achieve the following:

  1. Rewrite the JavaScript code as an Immediately-Invoked Function Expressions (IIFE).
  2. Use nested web workers to handle the file uploads. If the browser does not support nested web workers then the subworkers.js polyfill can be used to meet this requirement.
  3. To be able to resume a file upload. Resuming an upload will not overwrite the file if it already exists.
  4. Provide complete samples of the back-end server code  in ASP.NET and Node.js



To use CelerFT in your application all that is required is to include celerft.js as shown below:

    <script src="Scripts/jquery-2.1.1.min.js"></script>
    <script src="Scripts/subworkers.js"></script>
    <script src="Scripts/celerft.js"></script>

Once celerft.js is added then it is used by creating a new CelerFT object an and passing an array to it with the id of the UI controls on the page, that CelerFT needs to interact with, and the URL of the back-end endpoints. Please see the readme on the Github Repository for a more detailed description of CelerFT.

var cft = new CelerFT(options);
            cft.init();


I have been toying with the idea of adding support for:
  1. Drag and drop file and directory uploads
  2. A UI to manage the back-end
  3. File downloads
  4. Security and process controls
  5. Object Storage API 
This would pretty much mean that the Gigabit Upload project could evolve into a full blown application. However before I go down that road it would be good to hear if there is any interest in this area. Send me an email to let me know.


No comments:

Post a Comment