lib/impl/pdfGeneration/cacheFiles.js
function removeCachedFiles(params, cb) {
  //Cleaning Up Any Files Cached To Render The Submission.
  logger.debug("cacheFiles: mergeSubmissionFiles Removing Cached Files For PDF Generation: ", params.submissionFiles);
  async.eachSeries(params.submissionFiles || [], function(submissionFileDetails, cb) {
    logger.debug("Removing Cached File: ", submissionFileDetails);
    fs.unlink(submissionFileDetails.url, function(err) {
      if (err) {
        logger.error('Error Removing File At' + submissionFileDetails.url);
      }

      return cb();
    });
  }, cb);
}
function removeCachedFiles(params, cb) {
  //Cleaning Up Any Files Cached To Render The Submission.
  logger.debug("cacheFiles: mergeSubmissionFiles Removing Cached Files For PDF Generation: ", params.submissionFiles);
  async.eachSeries(params.submissionFiles || [], function(submissionFileDetails, cb) {
    logger.debug("Removing Cached File: ", submissionFileDetails);
    fs.unlink(submissionFileDetails.url, function(err) {
      if (err) {
        logger.error('Error Removing File At' + submissionFileDetails.url);
      }

      return cb();
    });
  }, cb);
}
function removeCachedFiles ( params , cb ) { //Cleaning Up Any Files Cached To Render The Submission. logger . debug ( "cacheFiles: mergeSubmissionFiles Removing Cached Files For PDF Generation: " , params . submissionFiles ) ; async . eachSeries ( params . submissionFiles || [ ] , function ( submissionFileDetails , cb ) { logger . debug ( "Removing Cached File: " , submissionFileDetails ) ; fs . unlink ( submissionFileDetails . url , function ( err ) { if ( err ) { logger . error ( 'Error Removing File At' + submissionFileDetails . url ) ; } return cb ( ) ; } ) ; } , cb ) ; }
Removing Any Cached Files Needed For Rendering The PDF
@param params
@param cb
@private
Removing Any Cached Files Needed For Rendering The PDF