Ajax is based on JavaScript, while JS cannot operate for security reasons.CompositionTherefore, Ajax cannot directly upload attachments. You can use other workarounds.
However, Ajax submission is based on the HTTP protocol. It can also be divided into get and post submission methods. You can put the Form Content in the message body, which is similar to form. the submit () is the same. Why is form used. submit () can process attachments, but Ajax cannot?
Q: How do you use js to read client files ?? Permissions must be obtained from Javascript. js cannot operate files for security reasons.
When a file is submitted using the form input control, the obtained client content isBrowserRather than Js.
The browser is responsible for reading local files, and the JS written by the developer reads local files. For security reasons, the latter obviously has no permissions.