anchor.diff:    // this script will use jquery file upload to handle the uploading of files in chunks
     $(function () {
         var chunkSize = 1000000;
  -      var localFileCount = 0;
         var localFileUploadCount = 0;
  +      // prevent user from uploading too much data
  +      var maxUploadSize = 20 * 1024 * 1024 * 1024;
  +      var localFilesToUpload = [];
  +      var bytesToMegabytes = function (bytes) {
  +        return Math.round(bytes/1024/1024 * 10) / 10;
  +      };
  +      var totalUploadSize = function () {
  +        var total = 0;
  +        if (typeof selectedNodes !== 'undefined' && selectedNodes instanceof Array) {
  +          for (var i = 0; i < selectedNodes.length; i++) {
  +            total += selectedNodes[i].data["size"] ? parseInt(selectedNodes[i].data["size"]) : 0;
  +          }
  +        }
  +        if (typeof localFilesToUpload !== 'undefined' && localFilesToUpload instanceof Array) {
  +          for (var i = 0; i < localFilesToUpload.length; i++) {
  +            total += localFilesToUpload[i].files[0].size || 0;
  +          }
  +        }
  +        return total;
  +      };
         var updateProgress = function (filename, progress) {
           $('#progressbar_progress').removeClass('fail').addClass('normal');
           $('#progressbar_progress').css('width', progress + '%');
           $('#progressinfo').html(filename + " " + progress + '%');
         };
         var alertNoFiles = function () {alert("You haven't selected and files");};
  +      var alertUploadTooLarge = function () {alert("You are attempting to upload " + bytesToMegabytes(totalUploadSize()) + "Mb of data - the maximum amount of data you can deposit is " + bytesToMegabytes(maxUploadSize) + "Mb")}
         var disableSubmit = function () {
           $("#submit_btn").attr("disabled", true);
           $("#submit_btn").html("Please wait...");
  
positive.code:               localFileUploadCount++;
                // if the number of 'done' files equals the number of selected files, then all uploads are done
                // handle google files (if there are any), which will also submit main form
                if (localFileUploadCount == localFileCount) {
                  getGoogleFiles(false);
                }
            },
  
negative.code:       var getGoogleFiles = function (showAlertIfNoFilesSelected) {
          // if 'selectedNodes' variable exists and is an array then the user has selected google drive files
          if (typeof selectedNodes !== 'undefined' && selectedNodes instanceof Array && selectedNodes.length > 0) {
            // if the user isn't tring to upload too much data, kick off the upload
            if (totalUploadSize() < maxUploadSize) {
              disableSubmit();
              // kick of the fetching of the google files - this will recursively fetch all chunks and call 'finishUpload' when done
              getGoogleFileChunk(0, "<%= @dataset.id %>", 0, chunkSize-1); 
            } else {
              alertUploadTooLarge();
            }
          // otherwise, no google files selected, present 'no files selected' alert or call 'finishUpload'
          } else {
            if (showAlertIfNoFilesSelected) {
  