plupload 与 ASP.NET 表单验证处理程序
我正在尝试使用 plupload 在 ASP.NET 中上传文件。理想情况下,我的上传处理程序需要包含在我网站上的表单身份验证中,但在这种情况下它不起作用。我看不到 plupload 在 firebug 中发出的请求,并且不太明白它在做什么。有什么办法可以解决这个问题吗?
这是我的 plupload 初始化代码:
$(function () {
$("#uploader").pluploadQueue({
runtimes: 'gears,flash,silverlight,browserplus,html5,html4',
url: '/Handlers/UploadImage.ashx',
filters: [
{ title: "Image files", extensions: "jpg,gif,png" },
{ title: "Zip files", extensions: "zip" }
],
flash_swf_url: '/Scripts/plupload/plupload.flash.swf',
silverlight_xap_url: '/Scripts/plupload/plupload.silverlight.xap'
});
I am trying to use plupload to upload files in ASP.NET. My upload handler ideally needs to be included in the forms authentication on my site, but it doesn't work in this case. I can't see the request that plupload makes in firebug, and don't really understand what its doing. Is there any way to get around this problem?
Here is my plupload initialisation code:
$(function () {
$("#uploader").pluploadQueue({
runtimes: 'gears,flash,silverlight,browserplus,html5,html4',
url: '/Handlers/UploadImage.ashx',
filters: [
{ title: "Image files", extensions: "jpg,gif,png" },
{ title: "Zip files", extensions: "zip" }
],
flash_swf_url: '/Scripts/plupload/plupload.flash.swf',
silverlight_xap_url: '/Scripts/plupload/plupload.silverlight.xap'
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将闪存设置为列表中的第一个运行时,这就是正在使用的。 Flash 有一个错误 (http://bugs.adobe.com/jira/browse/ FP-1044),这会导致在执行 FileReference.upload 时丢弃任何现有的 cookie 和身份验证(摘要/基本)信息。 plupload 有一个标志强制 flash 使用 URLStream 而不是 FileReference.upload。将其设置为 true 可以解决我遇到的问题。 :)
I had flash set as the first runtime in my list, and this was what was being used. Flash has a bug in it (http://bugs.adobe.com/jira/browse/FP-1044), which causes any existing cookies and authentication (digest/basic) information to be discarded when doing FileReference.upload. plupload has a flag to force flash to use URLStream instead of FileReference.upload. Setting this to true fixes the problem I was having. :)