- Created complete documentation in docs/ directory - Added PROJECT_OVERVIEW.md with feature highlights and getting started guide - Added ARCHITECTURE.md with system design and technical details - Added SECURITY.md with comprehensive security implementation guide - Added DEVELOPMENT.md with development workflows and best practices - Added DEPLOYMENT.md with production deployment instructions - Added API.md with complete REST API documentation - Added CONTRIBUTING.md with contribution guidelines - Added CHANGELOG.md with version history and migration notes - Reorganized all documentation files into docs/ directory for better organization - Updated README.md with proper documentation links and quick navigation - Enhanced project structure with professional documentation standards
1 line
4.6 KiB
JavaScript
1 line
4.6 KiB
JavaScript
function fileQueued(e){try{var t=new FileProgress(e,this.customSettings.progressTarget);t.setStatus("Pending...");t.toggleCancel(true,this)}catch(e){this.debug(e)}}function fileQueueError(e,t,s){try{if(t===SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){alert("You have attempted to queue too many files.\n"+(s===0?"You have reached the upload limit.":"You may select "+(s>1?"up to "+s+" files.":"one file.")));return}var a=new FileProgress(e,this.customSettings.progressTarget);a.setError();a.toggleCancel(false);switch(t){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:a.setStatus("File is too big.");this.debug("Error Code: File too big, File name: "+e.name+", File size: "+e.size+", Message: "+s);break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:a.setStatus("Cannot upload Zero Byte files.");this.debug("Error Code: Zero byte file, File name: "+e.name+", File size: "+e.size+", Message: "+s);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:a.setStatus("Invalid File Type.");this.debug("Error Code: Invalid File Type, File name: "+e.name+", File size: "+e.size+", Message: "+s);break;default:if(e!==null){a.setStatus("Unhandled Error")}this.debug("Error Code: "+t+", File name: "+e.name+", File size: "+e.size+", Message: "+s);break}}catch(e){this.debug(e)}}function fileDialogComplete(e,t){try{if(e>0){document.getElementById(this.customSettings.cancelButtonId).disabled=false}this.startUpload()}catch(e){this.debug(e)}}function uploadStart(e){try{var t=new FileProgress(e,this.customSettings.progressTarget);t.setStatus("Uploading...");t.toggleCancel(true,this);$("#progress-stats").removeClass("no-display");this.customSettings.progressCount=0;updateDisplay.call(this,e)}catch(e){}return true}function uploadProgress(e,t,s){try{var a=Math.ceil(t/s*100);var i=new FileProgress(e,this.customSettings.progressTarget);i.setProgress(a);i.setStatus("Uploading...");this.customSettings.progressCount++;updateDisplay.call(this,e)}catch(e){this.debug(e)}}function uploadSuccess(e,t){try{var s=new FileProgress(e,this.customSettings.progressTarget);s.setComplete();s.setStatus("Complete.");s.toggleCancel(false);updateDisplay.call(this,e)}catch(e){this.debug(e)}}function uploadError(e,t,s){try{var a=new FileProgress(e,this.customSettings.progressTarget);a.setError();a.toggleCancel(false);switch(t){case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:a.setStatus("Upload Error: "+s);this.debug("Error Code: HTTP Error, File name: "+e.name+", Message: "+s);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:a.setStatus("Upload Failed.");this.debug("Error Code: Upload Failed, File name: "+e.name+", File size: "+e.size+", Message: "+s);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:a.setStatus("Server (IO) Error");this.debug("Error Code: IO Error, File name: "+e.name+", Message: "+s);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:a.setStatus("Security Error");this.debug("Error Code: Security Error, File name: "+e.name+", Message: "+s);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:a.setStatus("Upload limit exceeded.");this.debug("Error Code: Upload Limit Exceeded, File name: "+e.name+", File size: "+e.size+", Message: "+s);break;case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:a.setStatus("Failed Validation. Upload skipped.");this.debug("Error Code: File Validation Failed, File name: "+e.name+", File size: "+e.size+", Message: "+s);break;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:if(this.getStats().files_queued===0){document.getElementById(this.customSettings.cancelButtonId).disabled=true}a.setStatus("Cancelled");a.setCancelled();break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:a.setStatus("Stopped");break;default:a.setStatus("Unhandled Error: "+t);this.debug("Error Code: "+t+", File name: "+e.name+", File size: "+e.size+", Message: "+s);break}}catch(e){this.debug(e)}}function uploadComplete(e){if(this.getStats().files_queued===0){document.getElementById(this.customSettings.cancelButtonId).disabled=true}var t="#upload-form";var s=$(t).attr("action");if($("#total-uploads").val()=="0"){$("#fsUploadStats").load(s+"&do=reload-stats")}$.post(s,$(t).serialize(),function(e){$("#form-response").html(e)})}function queueComplete(e){$("#progress-stats").addClass("no-display")}function updateDisplay(e){this.customSettings.tdCurrentSpeed.innerHTML=SWFUpload.speed.formatBPS(e.currentSpeed);this.customSettings.tdAverageSpeed.innerHTML=SWFUpload.speed.formatBPS(e.averageSpeed);this.customSettings.tdTimeRemaining.innerHTML=SWFUpload.speed.formatTime(e.timeRemaining);this.customSettings.tdTimeElapsed.innerHTML=SWFUpload.speed.formatTime(e.timeElapsed);this.customSettings.tdPercentUploaded.innerHTML=SWFUpload.speed.formatPercent(e.percentUploaded);this.customSettings.tdSizeUploaded.innerHTML=SWFUpload.speed.formatBytes(e.sizeUploaded)} |