<%@ Language="VBScript" %>
<!--#include file="../config.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Aurigma Image Uploader Demos &mdash; Robust Upload Demo</title>

	<link href="../common.css" type="text/css" rel="stylesheet" />
	
	<script type="text/javascript" src="../Scripts/iuembed.js"></script>
	<script type="text/javascript" src="../Scripts/iuembed.InstallationProgress.js"></script>
	<style type="text/css">
		.ScreenStyle {background-color:#ffffff;font-family:verdana;font-size:11px;padding:10px;text-align:center}
    </style>	
</head>
<body>
	<form>	
		<h1><a href="../default.asp">Aurigma Image Uploader Demos</a> &rarr; Robust Upload Demo</h1>
		<p>
			This application demonstrates how to organize robust upload using Image Uploader.
			In this demo application Image Uploader computes MD5 and SHA1 hash values for each
			uploaded file and sends them to the server. The server script calculates hash value
			for the file it receives and then compares result with uploaded hash. This way you
			can verify whether the file was corrupted during upload.
		</p>
		<p>
			Additionally in this application you can see how to:
		</p>
		<ul>
			<li>Use custom-drawn buttons in Image Uploader.</li>
			<li>Resume upload automatically when connection breaks.</li>
		</ul>
		<div class="note">
			<h4>Note</h4>
			<p>
				This demo application <strong>deletes all previously uploaded files</strong>.
				Keep in mind that it is a feature of this demo, not of Image Uploader itself. If
				you <strong>do not want to delete uploaded files</strong>, you should modify the
				upload processing page specified by the <strong>Action</strong> parameter.
			</p>
		</div>

		<script type="text/javascript">
//<![CDATA[	
//Create JavaScript object that will embed Image Uploader to the page.
var iu = new ImageUploaderWriter("ImageUploader1", 650, 400);

//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "../Scripts/ImageUploader6.cab";
iu.activeXControlVersion = "6,5,27,0";

//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletJarFileName = "ImageUploader6.jar";
iu.javaAppletCodeBase = "../Scripts/";
iu.javaAppletCached = true;
iu.javaAppletVersion = "6.5.27.0";

iu.showNonemptyResponse = "off";

//Customize appearance and behavior.
iu.addParam("PaneLayout", "OnePane");
iu.addParam("UploadView", "Details");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AllowRotate", "false");
iu.addParam("BackgroundColor", "#ffffff");

//Configure License Keys
iu.addParam("LicenseKey", "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX;XXXXX-XXXXX-XXXXX-XXXXX-XXXXX");

//Customize Image Uploader buttons.
iu.addParam("ButtonAddFoldersImageFormat", "Width=128;Height=25;UrlNormal='../Images/AddFoldersNormal.png';UrlNormalFocused='../Images/AddFoldersNormalFocused.png';UrlHover='../Images/AddFoldersHover.png';UrlHoverFocused='../Images/AddFoldersHoverFocused.png';UrlPressed='../Images/AddFoldersPressed.png'");
iu.addParam("ButtonAddFilesImageFormat", "Width=109;Height=25;UrlNormal='../Images/AddFilesNormal.png';UrlNormalFocused='../Images/AddFilesNormalFocused.png';UrlHover='../Images/AddFilesHover.png';UrlHoverFocused='../Images/AddFilesHoverFocused.png';UrlPressed='../Images/AddFilesPressed.png'");
iu.addParam("ButtonSendImageFormat", "Width=82;Height=25;UrlDisabled='../Images/UploadDisabled.png';UrlNormal='../Images/UploadNormal.png';UrlNormalFocused='../Images/UploadNormalFocused.png';UrlHover='../Images/UploadHover.png';UrlHoverFocused='../Images/UploadHoverFocused.png';UrlPressed='../Images/UploadPressed.png'");

//Configure custom button caching.
iu.addParam("CacheGuiGraphics","true");
iu.addParam("GuiGraphicsVersion","1");

//Compute and send for files SHA and MD5 hash.
iu.addParam("HashAlgorithm", "SHA;MD5");

//Configure upload settings.
iu.addParam("FilesPerOnePackageCount", "1");
iu.addParam("AutoRecoverMaxTriesCount", "10");
iu.addParam("AutoRecoverTimeOut", "10000");

//Configure URL files are uploaded to.
iu.addParam("Action", "upload.asp");

//Configure URL where to redirect after upload.
iu.addParam("RedirectUrl", "gallery.asp");

//Create installation progress.
var ip = new InstallationProgressExtender(iu);
ip.setProgressImageUrl("../Scripts/InstallationProgress.gif");
ip.setProgressCssClass("ScreenStyle");
ip.setInstructionsCssClass("ScreenStyle");

//Tell Image Uploader writer object to generate all necessary HTML code to embed 
//Image Uploader to the page.
iu.writeHtml();
//]]>
		</script>
	</form>
</body>
</html>
<!--END-->