????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 13.59.91.46 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/icad.astacus.se/productionzon/JavaPowUpload/ |
Upload File : |
<!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Amazon S3 policy and signature generator</title> <link rel="stylesheet" href="styles.css"> <script type="text/javascript" src="Extra/sha1.js"></script> <script type="text/javascript" src="Extra/base64.js"></script> </head> <body> Sample: <b>amazons3generator.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.htm"><img border="0" src="images/home.png" width="16" height="16"> Examples home</a><br/> <br/> <!-- text below wil be shown if JavaScript disabled at browser --> <span id="noscriptdiv" style="border:1px solid #FF0000;display:block;padding:5px;text-align:left; background: #FDF2F2;color:#000;">Active Scripting (JavaScript) should be enabled in your browser for this application to function properly!</span> <script type="text/javascript"> document.getElementById('noscriptdiv').style.visibility = 'hidden'; document.getElementById('noscriptdiv').style.height = 0; document.getElementById('noscriptdiv').style.padding = 0; document.getElementById('noscriptdiv').style.border = 0; </script> <p> <script type="text/javascript"> function generatePolicy () { var s3keyId = document.getElementById("s3keyId").value; var s3Secret = document.getElementById("s3Secret").value; var s3bucket = document.getElementById("s3bucket").value; var expYear = document.getElementById("expYear").value; if(!s3keyId || !s3Secret || !s3bucket || !expYear) { alert("Please fill all required fields (marked with *) and try again!"); return ; } var s3policy = "{\n 'expiration': '"+expYear+"-01-01T12:00:00.000Z',\n"+ " 'conditions': [\n"+ " {'bucket': '"+s3bucket+"'},\n"+ " ['starts-with', '$Filename', ''],\n"+ " ['starts-with', '$key', ''],\n"+ " ['starts-with', '$acl', ''],\n"+ " ['starts-with', '$Content-Type', ''],\n"+ " ['eq', '$success_action_status', '201']\n"+ " ]\n"+ "}"; document.getElementById("policy_sign").value = s3policy; var s3policyenc = Base64.encode(document.getElementById("policy_sign").value); var signature = b64_hmac_sha1(s3Secret, s3policyenc)+'='; document.getElementById("policy").innerHTML = s3policyenc; document.getElementById("signature").innerHTML = signature; var mpu_code = '<param name="Upload.UploadUrl" value="'+buildUrl(s3bucket)+'"><br>'; mpu_code += '<param name="Upload.AmazonS3.AccessKeyId" value="'+s3keyId+'"><br>'; mpu_code += '<param name="Upload.AmazonS3.Policy" value="'+s3policyenc+'"><br>'; mpu_code += '<param name="Upload.AmazonS3.Signature" value="'+signature+'"><br>'; mpu_code += '<param name="Upload.AmazonS3.Acl" value="'+document.getElementById("acl").value+'"><br>'; mpu_code += '<param name="Upload.AmazonS3.Key" value="'+document.getElementById("folder").value+'/#FILENAME#'+'">'; document.getElementById("mpu_code").innerHTML = mpu_code; } function buildUrl(bucket) { var canUseVanity = canUseVanityStyle(bucket); var postUrl = "http://"; var amazonServer = "s3.amazonaws.com"; if(canUseVanity) { postUrl += bucket + "." + amazonServer; } else { postUrl += amazonServer + "/" + bucket; } return postUrl; } function canUseVanityStyle(bucket) { if( bucket.length < 3 || bucket.length > 63 || bucket.match(/^\./) || bucket.match(/\.$/) ) { return false; } // must be lower case if(bucket.toLowerCase() != bucket) { return false; } // Check not IPv4-like if (bucket.match(/^[0-9]|\+\.[0-9]|\+\.[0-9]|\+\.[0-9]|\+$/)) { return false; } // Check each label if(bucket.match(/\./)) { var labels = bucket.split(/\./); for (var i = 0;i < labels.length; i++) { if(!labels[i].match(/^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$/)) { return false; } } } return true; } </script> This page help you to configure JavaPowUpload to upload files directly to Amazon Simple Storage Service (S3). </p> <!--<p>Please note, that <strong>you should put crossdomain.xml file at the root of your bucket</strong> in order to allow JavaPowUpload upload files into this bucket. <br> <strong>And grant 'public-read' permissions to this file</strong>. Read more about crossdomain security policy at JavaPowUpload <a href="http://element-it.com/OnlineHelpJavaPowUpload/CrossDomainSecurity.html">documentation</a>. </p>--> <p>Required fields marked with *. </p> <label> Input your <strong>Amazon S3 Access Key ID*</strong>:<br> <input name="textfield" type="text" id="s3keyId" size="50"> </label> <br> <label> Input your <strong>Amazon S3 Secret Access Key*</strong>:<br> <input name="textfield" type="text" id="s3Secret" size="50"> </label> <br> <label> Input <strong>bucket name*</strong>:<br> <input name="textfield" type="text" id="s3bucket" size="50"> </label> <br> <br> <label> Input <strong>expiration year*</strong>:<br> <input name="textfield" type="text" id="expYear" size="4" value="2020"> </label> <br> <label> Input <strong>default acl</strong> for uploaded files (optional). <br> By default 'public-read' used:<br> <select id='acl'> <option value="private">private</option> <option value="public-read" selected>public-read</option> <option value="public-read-write">public-read-write</option> <option value="authenticated-read">authenticated-read</option> </select> </label> <br> <label> <strong>Folder</strong> in bucket where uploaded files should be stored (optional):<br> <input name="textfield" type="text" id="folder" size="50"> </label> <p>Here is your policy to sign:</p> <p> <textarea id="policy_sign" cols="100" rows="10"> </textarea> </p> <p> <input name="button" type="button" onClick="generatePolicy()" value="Generate S3 Policy and Signature"> </p> <p><br> Here is your policy: </p> <div id="policy"> </div> <hr> Here is your signature: <div id="signature"> </div> <hr> <h2><strong>Here is code for JavaPowUpload</strong> (You should copy that code and paste into page with <strong>JavaPowUpload</strong>.) </h2> <div id="mpu_code"> </div> </body> </html>