Upload fails when user drags and drops attachment from email client

本小妞迷上赌 提交于 2019-11-26 16:39:10
Dmitry Streblechenko

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.

I found a free solution to your drag and drop problem: 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. Instead, they are contained in a PST file, OST file, or on an Exchange server.

However, many applications do not support, such as web browers and most .NET/ Java applications.

To work around this issue, Outlook File Drag hooks the Outlook drag and drop process and adds support for physical files (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

but the free one works fine, and it's open source!

FWIW dragging from client to browser now works with Microsoft Edge and Outlook.

Tested with Outlook 2016 and Edge 42.17134.1.0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!