Basically i’m attempting to upload a file, if i pass a callback function like below
attachments.send(function(response){
});
the function never gets called, and no response is provided.
if i attempt to do the following;
if(attachments.send(fileId)){
}
if the server experiences an error… for instance an invalid file type. the function will pass with true, however the status of the file will remain ‘transfer’.
What i would like is the ability to get to the server response after the uploader has attempted to send the file. That way if the specified file type is not supported or invalid, i can notify the user of such.
Ideas?
Also, i think i found a bug where file.name is not added to the end of xhr request. This causes the filename to be different based on the browser. If it’s added, the filename is consistent between multiple browsers. If not, firefox handles the file name correctly, IE returns the full path an concat the path separators, thus making it almost impossible to extract the file name.