Skip to main content
New Participant
February 28, 2023
Question

Simple Upload page, ERR_CONNECTION_RESET

  • February 28, 2023
  • 2 replies
  • 546 views

Hello,

 

I'm trying to create a simple multi-upload page with javascipt progress bar.

All wordks fine if I upload a few (22 or less) files, but if I upload more than 22 files, en error occures "net::ERR_CONNECTION_RESET". (the idea is to be able to upload at leats 1000 files in one go)

 

Im running CF2023 on a windows server with IIS. U|sing the page throug IIS or directly with IPadres on port 8501 makes no difference.

I have tried to use smaller files, but whatervere I do, I'm not getting the files to upload if uploading 23 or more files.

The upload works with XHR2 acync.

 

Can anyone tell me what I'm doing wrong, or where to find the correct setting to change this behaviour

 

Thanks in advance

    This topic has been closed for replies.

    2 replies

    BKBK
    Community Expert
    February 28, 2023

    Could you please share the code that you're using. That would help.

    New Participant
    February 28, 2023

    Hi BKBK,

    I have attached alle the files I use(renamed them with .txt).

    The original code is from an old item https://github.com/archived-by-ben/html5Upload

    I have stripped the things I didnt need and made some minor adjustments.

    The index file im using is not allowed to be uploaded, so this is the code:

    <!DOCTYPE html>
    <html lang="en">
    	
    	<head>
    		<title>HTML5 Multiple files upload</title>
    		<meta charset="utf-8" />
    		<style>
    			body {}
    			header, footer { text-align: center; }
    			main { padding: 2em; }
    			#feedBack { display: none; }
    			#uploadProgress { display: none; }
    		</style>
    		<!-- <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css">
    		<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap-theme.min.css"> -->
    		<script src="submit.js"></script>
    		<script>
    			function displayUpBtn() {
    				document.getElementById("upload-files-button").style.display='inline';
    			}
    		</script>
    	</head>
    	<body onload="displayUpBtn();">
    		<header>
    			<h3>html5Upload</h3>
    			<h5>HTML5 Multiple files upload example for CFML/ColdFusion/Railo using XMLHttpRequest Level 2</h5>
    		</header>
    		<main>
    			<form action="submit.cfm" enctype="multipart/form-data" id="form1" class="form-horizontal" method="post">
    				<div class="form-group">
    					<label for="upload-tmpFiles" class="col-sm-1 control-label">Files to upload</label>
    					<div class="col-sm-10">
    					<input class="btn btn-default" id="upload-tmpFiles" name="upload.tmpFiles" type="file" onchange="fileSelected();" required multiple>
    					</div>
    				</div>
    				<div class="form-group">
    					<label for="upload-comment" class="col-sm-1 control-label">Information</label>
    					<div class="col-sm-10">
    						<textarea class="form-control" id="upload-comment" name="upload.comment" rows="2" placeholder="About these files."></textarea>
    					</div>
    				</div>
    				<div class="form-group">
    					<label class="col-sm-1 control-label">Controls</label>
    					<div class="col-sm-11">
    						<!-- 
    							The Upload files! button needs to be a type=button for the JavaScript to trigger correctly.
    							This button will be displayed using the displayUpBtn() function triggered by the <body> onload event.
    						-->
    						<button type="button" id="upload-files-button" class="btn btn-default" onclick="startUpload(this.form);" style="display: none;">Upload files!</button>
    						<noscript>
    							<button type="submit" class="btn btn-default">Upload files!</button>
    						</noscript>
    						<button type="button" class="btn btn-default" onclick="abortUpload(this.form);">abort</button>
    						<button type="reset" class="btn btn-default" onclick="resetUpload(this.form);">reset</button>
    						<div class="checkbox">
    							<label>
    								<input type="checkbox" id="debug-mode" name="debug.mode"> Debug mode (use console.log and display cfdumps)
    							</label>
    						</div>
    					</div>
    				</div>
    				<div id="uploadProgress" class="form-group">
    					<label class="col-sm-1 control-label">Progress</label>
    					<div class="col-sm-11">
    						<progress id="progressBar" max="100" value="0"></progress> <strong><span id="progressPercentage">0</span>%</strong> <span id="transferSpeed"></span>
    					</div>
    				</div>
    			</form>
    			<div id="feedBack">
    				<!-- form feedback messages -->
    			</div>
    		</main>
    		<footer>
    			<a href="http://caniuse.com/xhr2">Not working?</a> <noscript>With your JavaScript disabled the HTML5 multiple files input is not processed correctly by ColdFusion/Railo.</noscript>
    		</footer>
    	</body>
    </html>

     

    New Participant
    February 28, 2023

    Excuse me, Im runnin CF2021