Ajaxfileupload is a jquery plugin that uploads files asynchronously.
Syntax: $.ajaxfileupload ([options])
Options parameter Description:
1, URL upload handler address.
2,fileelementid the ID of the file domain that needs to be uploaded, which is the ID of <input type= "file" >.
3,secureuri whether secure commits are enabled, false by default.
4,datatype the data type returned by the server. Can be a xml,script,json,html. If you do not fill in, jquery will automatically determine.
5,success the processing function that is executed automatically after the commit succeeds, the parameter data is the server return.
6,error the processing function that failed to submit the automatic execution.
7,data custom parameters. This thing is more useful, when the data is related to the uploaded image, this thing will be used.
8, type when you want to submit a custom parameter, this parameter is set to post
Error message:
1,syntaxerror:missing; Before statement error
If this error occurs, you will need to check if the URL path is accessible
2,syntaxerror:syntax Error errors
If this error occurs, you need to check the server spooler that handles the commit operation for any syntax errors
3,syntaxerror:invalid Property ID Error
If this error occurs, you need to check whether the Text field property ID exists
4,syntaxerror:missing} in XML expression error
If this error occurs, you need to check whether the file name is consistent or not present.
5, other custom errors
You can use the variable $error Direct printing method to check whether the parameters are correct, compared to the above these invalid error prompts are much more convenient.
jquery Plugin ajaxfileupload API documentation