当用户从电子邮件客户端拖放附件时上传失败 [英] Upload fails when user drags and drops attachment from email client

查看:16
本文介绍了当用户从电子邮件客户端拖放附件时上传失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用使用 jQuery 的 valums fileuploader 在我的应用程序中实现拖放功能.该功能运行顺利,直到其中一位用户尝试了以下操作.

I am using valums fileuploader using jQuery to implement drag and drop functionality in my application. The functionality was running smoothly until one of the users tried the following.

用户收到一封带有附件的电子邮件.他试图将附件直接从电子邮件客户端(Outlook)拖放到浏览器和拖放区域中.上传失败.但是当他将文件保存到他的文件系统中然后拖放文件时,上传成功了.

The user received an email with an attachment. He tried to drag and drop the attachment directly from the email client(Outlook) onto the browser and in the drop area. The upload was unsuccessful. But when he saved the file into his filesystem and then drag and dropped the file the upload was successful.

谁能告诉我当用户直接从电子邮件中拖动附件时后台会发生什么?它是否将文件保存在临时位置?如果是,那么为什么上传失败?

Can anyone let me know what happens in background when the user drags a attachment directly from email? Does it save the file in a temp location? If so then the why does the upload fail?

推荐答案

所有浏览器都只期待实际的文件拖放格式(CF_HDROP),但是从 Outlook 拖拽时,没有文件在文件系统上.你得到的是 CF_FILEDESCRIPTORCF_FILECONTENTS 格式.我所知道的浏览器(甚至 IE)都不知道如何处理.

All browsers are only expecting the actual file drag/drop format (CF_HDROP), but when dragging from Outlook, there is no file on the filesystem. What you get is the CF_FILEDESCRIPTOR and CF_FILECONTENTS formats. No browser that I know of (not even IE), knows how to handle that.

这篇关于当用户从电子邮件客户端拖放附件时上传失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆