Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery("#upload-button").Upload({
- url: "/wp-content/uploads/userphoto",
- name: "myfile",
- updateInterval: 1000,
- onSelect: function() {
- // File has been selected, let's see what it is:
- console.log(this.file);
- this.sendFile();
- },
- onUpdate: function() {
- // Let's update the user interface!
- jQuery("#bootstrap-progress-bar").css("width", this.getPercentage() + "%");
- jQuery("#throughput").html(this.getThroughput());
- jQuery("#upload-speed").html(this.getSpeed());
- // Need raw progress info for your own calculations?
- console.log(this.progress);
- },
- onComplete: function(dataFromServer) {
- // By default the response from the server is parsed, and we get it here
- console.log(dataFromServer);
- },
- onError: function(xhr) {
- alert("Some upload error happened");
- },
- onCancel: function() {
- alert("You the man!");
- }
- });
Add Comment
Please, Sign In to add comment