Sun, December 8, 2019, 04:00:17
 
Home · Latest · Trends  /  JavaScript
3

uploadify onUploadSuccess (Complete)

rated 3 times [  3] [ 0]  / comments: 0 / hits: 1409  / 3 years ago, mon, jun 19, 2017, 12:45:14
uploadify on uploadsuccess / complete example
$(function() {
    $('#file_upload').uploadify({
        'formData': {
            'timestamp': '<?php echo $timestamp;?>',
            'token': '<?php echo md5('
             unique_salt ' . $timestamp);?>'
        },
        'debug': false,
        'swf': 'jscripts/uploadify.swf',
        'uploader': 'upload.php',
        'onUploadSuccess': function(file, data, response) {
           $('#fileInfo').html('File name:' + file.name);
           $('#showImage').html('<img src="uploads/' + data + '" />');
           $('#showResponse').html('Response:' + response); 
           $('#newFileName').html('New file name:' + data);
        }
    });
});
//Required in php upload file:
//if(!$mynewimage) {
 //echo "error";
 //} else {
 //echo $mynewimage;
// }
More From » JavaScript
 

Comments

There are no comments for this Snippet yet
Username
 
Your Comment
 
Share
Snippets
reCaptcha in smarty template file
3 years ago, mon, dec 5, 2016
reCAPTCHA v.2.0. Sample Form. You need to get API key for your site. https://www.google.com/recaptcha/admin#list
3 years ago, mon, jan 9, 2017
PHP stopforumspam integration example ans class
3 years ago, mon, jan 16, 2017
esoTalk forum script / esoTalk-BBCode plugin with color tag [plugin.php] [resources/bbcode.js]
3 years ago, sat, jan 21, 2017
Smarty section start loop: First result, second result, first and second result
3 years ago, fri, feb 10, 2017
PHP replace bad words function / form
3 years ago, fri, feb 10, 2017
Get a domain name IP address with PHP
3 years ago, tue, feb 28, 2017
Get YouTube Video ID and clean URL with PHP
3 years ago, sun, mar 5, 2017
HTML Purifier posting arrays example
3 years ago, thu, mar 16, 2017
Thunderbird userchrome.css example C://Users/<USER>/AppData/Roaming/Thunderbird/Profiles/<PROFILE>/chrome/userChrome.css
3 years ago, sun, apr 16, 2017
Posted
jimmy

jimmy

Member since Dec 15, 2016
Total Code Snippets: 16
Total Comments: 2
Location: n/a
Following
User not following anyone yet.