Can I use the following jQuery code to perform file upload using POST method of an ajax request ?
(我可以使用以下jQuery代码使用ajax请求的POST方法执行文件上传吗?)
$.ajax({
type: "POST",
timeout: 50000,
url: url,
data: dataString,
success: function (data) {
alert('success');
return false;
}
});
If it is possible, do I need to fill data
part?
(如果有可能,我是否需要填写data
部分?)
Is it the correct way?(这是正确的方法吗?)
I only POST the file to the server side.(我只将文件发布到服务器端。)
I have been googling around, but what I found was a plugin while in my plan I do not want to use it.
(我一直在搜索,但是我发现是一个插件,而在我的计划中我不想使用它。)
At least for the moment.(至少目前是这样。)
ask by Willy translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…