I have read many articles etc that attempt to explain why a file (e.g. attachment etc) cannot be uploaded via AJAX (atleast without some \'tricks\' behind the scene).
Ca
Simply because javascript cannot access the file system...for obvious security reasons.
They can. It is XMLHttpRequest that can't be used to upload files. (But Ajax is more than XHR)
This is because, for security reasons, JavaScript can't read from the file system, so it can't get the file to hand to XHR.
For security reasons, modern browsers do not allow Javascript to access files on the viewer's computer.
File uploads are performed through a standard called multipart/form-data. Javascript has no way of reading the contents of files on the client computer.