Created
April 6, 2015 15:22
-
-
Save fregmented/1c69f661aedb108635db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("Droped!"); | |
var files = e.originalEvent.dataTransfer.files; | |
console.log(files) | |
//We need to send dropped files to Server | |
//handleFileUpload(files,obj); | |
var urls = []; | |
for(var i = 0; i<files.length; i++){ | |
var fd = new FormData(); | |
fd.append('musics', files[i]); | |
$.ajax({ | |
type : 'POST', | |
url : '/artist/getUploadPath', | |
data : "user="+getUser(), | |
cache : false, | |
async : false, | |
success : function(data) { | |
urls.push($.parseJSON(data)); | |
} | |
}); | |
var status = new createStatusbar(obj); | |
status.setFileNameSize(files[i].name, files[i].size); | |
upload(urls[i]['uploadUrl'], fd, status); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment