Jump to content

Drag & Drop from Firefox


midora

Recommended Posts

Dragging an image from Firefox to Paint.NET shows a bad filename and extension.

 

I.e. http://css-tricks.com/examples/RoundButtons/images/bg.png

 

The file is streamed OK (it shows transparency) but the filename is something ending with .bmp located in the users temp folder.

 

I expect that you are streaming the file from "FileContents" but taking the name form DataFormats.FileDrop and not from "FileGroupDescriptorW" because "FileGroupDescriptorW" does not contain a path.

 

I would propose to take the "FileGroupDescriptorW" name, set the file to dirty, and allow only "Save As" for this file (simular to "Paste to new image")

 

No idea what kind of code you are using to stream the file but

http://www.codeproject.com/Articles/28209/Outlook-Drag-and-Drop-in-C

works quite good (if all fixes are integrated to the code) and contains handling of files and contents arrays.

The code is not specific to Outlook.

 

 

midoras signature.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...