$(document).ready(function() { $('#file_upload').uploadify({ 'uploader' : '/public/vendor/uploadify/uploadify.swf', 'script' : '/public/vendor/uploadify/uploadify.php', 'cancelImg' : '/public/vendor/uploadify/cancel.png', 'folder' : '/public/img/upload-temp', 'fileExt' : '*.pdf;*.doc;*.docx;*.txt', 'fileDesc' : 'Resume File', 'buttonText': 'Upload Resume', 'sizeLimit' : 5242880, 'auto' : true, 'scriptData': { 'PHPSESSID': 'jlh385ub7nlfnmiodrlrbsdtt3', 'path':'' }, 'onError' : function (event,ID,fileObj,errorObj) { alert(errorObj.type + ' Error: ' + errorObj.info); }, 'onComplete' : function(event, ID, fileObj, response, data) { $('#buttons').hide(); $('#uploaded').empty(); $.ajax({ url: "/public/upload/get_s3_filename.php", data: {'PHPSESSID': 'jlh385ub7nlfnmiodrlrbsdtt3'}, type: 'POST', success: function(data){ $('#uploaded').html(''); $('#uploaded').addClass('upload-success'); $('
Your resume has been uploaded!
').appendTo('#uploaded'); $('#buttons').show(); $('#status').html(''); } }); }, 'onOpen' : function() { //$('#status').html(' Uploading image. Please wait...'); }, 'onSWFReady' : function() { $('#status').html(''); } }); $('#accept').click(function(){ //console.log('working'); window.opener.SetUrl($('#preview').attr('src')); window.close(); return false; }); });