[英]Upload fails when user drags and drops attachment from email client
I am using valums fileuploader using jQuery to implement drag and drop functionality in my application.我正在使用 jQuery 的 valums fileuploader 在我的应用程序中实现拖放功能。 The functionality was running smoothly until one of the users tried the following.
该功能运行顺利,直到其中一位用户尝试了以下操作。
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.
他试图将附件直接从电子邮件客户端(Outlook)拖放到浏览器和拖放区域中。 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?
如果是,那么为什么上传失败?
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.所有浏览器都只需要实际的文件拖放格式 (
CF_HDROP
),但是从 Outlook 拖动时,文件系统上没有文件。 What you get is the CF_FILEDESCRIPTOR
and CF_FILECONTENTS
formats.你得到的是
CF_FILEDESCRIPTOR
和CF_FILECONTENTS
格式。 No browser that I know of ( not even IE ), knows how to handle that.我所知道的浏览器(甚至 IE 也不知道)都不知道如何处理。
I found a free solution to your drag and drop problem: https://tonyfederer.github.io/OutlookFileDrag/我为您的拖放问题找到了一个免费解决方案: https : //tonyfederer.github.io/OutlookFileDrag/
From the website:从网站:
When you try to drag and drop from Outlook, Outlook correctly identifies the format as virtual files (CFSTR_FILEDESCRIPTORW) since the files do not exist directly on disk.
当您尝试从 Outlook 中拖放时,Outlook 正确地将该格式识别为虚拟文件 (CFSTR_FILEDESCRIPTORW),因为这些文件不直接存在于磁盘上。 Instead, they are contained in a PST file, OST file, or on an Exchange server.
相反,它们包含在 PST 文件、OST 文件或 Exchange 服务器上。
However, many applications do not support, such as web browers and most .NET/ Java applications.
但是,许多应用程序不支持,例如 Web 浏览器和大多数 .NET/Java 应用程序。
To work around this issue, Outlook File Drag hooks the Outlook drag and drop process and adds support for physical files (CF_HDROP).
要解决此问题,Outlook 文件拖动会挂钩 Outlook 拖放过程并添加对物理文件 (CF_HDROP) 的支持。 When the application asks for the physical files, the files are saved to a temp folder.
当应用程序要求提供物理文件时,这些文件将保存到临时文件夹中。
I looked at https://outlook2web.com/ and https://www.wilutions.info/ddaddin-download.html我查看了https://outlook2web.com/和https://www.wilutions.info/ddaddin-download.html
but the free one works fine, and it's open source!但免费的工作正常,而且它是开源的!
June 2020 Update: Chrome and Edge can now interface with the latest Outlook, FireFox still has an open ticket though: https://bugzilla.mozilla.org/show_bug.cgi?id=580928 2020 年 6 月更新:Chrome 和 Edge 现在可以与最新的 Outlook 交互,但 FireFox 仍然有一个开放的票证: https : //bugzilla.mozilla.org/show_bug.cgi?id=580928
FWIW dragging from client to browser now works with Microsoft Edge and Outlook. FWIW 从客户端拖动到浏览器现在可以与 Microsoft Edge 和 Outlook 配合使用。
Tested with Outlook 2016 and Edge 42.17134.1.0使用 Outlook 2016 和 Edge 42.17134.1.0 进行测试
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.