Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. 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. 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?

like image 559
Pratik Shelar Avatar asked Jun 19 '13 06:06

Pratik Shelar


People also ask

Why can't I drag and drop attachments in Outlook?

To fix it, make sure that the Outlook window is active, and press the ESC key several times. After that, you should be able to use the drag & drop feature again. Besides, this might also happen if certain Outlook folders are corrupted which causes the problem with drag & drop. Close your Outlook.

Why is Outlook not uploading attachments?

If you can't attach files in Outlook, you can change the sharing preferences and check if it resolves the issue or not. It is quite easy when you are using the Outlook.com to send an email. To get started, open the Settings panel and visit Mail > Attachments. From here, you can change your sharing preferences.

Why are emails with attachments not coming through?

If the e-mail box is full of other e-mail messages and your storage space is limited to only a few megabytes, the attachment cannot be received. E-mail programs and e-mail service providers automatically reject incoming e-mails if there is not enough space available to store the e-mails.


1 Answers

Most 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.

like image 119
Dmitry Streblechenko Avatar answered Oct 06 '22 23:10

Dmitry Streblechenko