18

Is there any, even an experimental, way to drag a file from the browser window to desktop? May be new browsers experimental features? Anything would help. Thanks!

Sergei Basharov
  • 51,276
  • 73
  • 200
  • 335
  • Seems like it would require file handling capabilities. i.e the website has access to your computer. Never a good idea. So I don't think its possible. – Shouvik Mar 24 '11 at 09:06
  • I think with js, if you add an activeX object, it gives js the necessary file handling capabilities. I donno much about it, but I think that would be a good place to start... =) – Shouvik Mar 24 '11 at 09:12
  • By "file", do you mean "something programmed to work like a file and which can be dragged to the desktop" (like Gmail) or "built-in draggable objects", like images to desktop (which in Ubuntu 12.04 + Firefox create links on the desktop)? – Ciro Santilli OurBigBook.com Aug 23 '14 at 15:58
  • The other way around: desktop to browser: http://stackoverflow.com/questions/2677565/drag-and-drop-file-attachment-to-browser-how-do-they-do-it – Ciro Santilli OurBigBook.com Aug 23 '14 at 15:59
  • 1
    @Shouvik not sure why the site would need access to your file system, this should be a browser feature to just download links that you drag to your system if they point to a download URL. Nothing about that requires file sys access for the website itself. – CJT3 Jun 19 '15 at 13:24

1 Answers1

14

I've just found a CSS Ninja post on his blog, you can find it here "Drag out files like Gmail"

MiPnamic
  • 1,257
  • 10
  • 18
  • these folks are google are always upto no good! I am assuming, that they have bypassed some user defined constrains on how files should be handled by browsers. Now its only some time before a couple of hackers learn how to do it, and we have new attacks originating from chrome everyday! – Shouvik Mar 24 '11 at 09:07
  • """People desire that "do things" become easier every day... who cares about security? Do you think that hackers are interested in my own data, who I am?""" (this is what I hear every day) – MiPnamic Mar 24 '11 at 09:11
  • 2
    Ummm, yes they are... It is the reason even crome organizes events so that hackers can find faults with their browsers, so that they can fix the holes. Most people don't like others having free access to their data or computers... – Shouvik Mar 24 '11 at 09:15
  • It seems like it's what I needed for my experiments. Thanks! – Sergei Basharov Mar 24 '11 at 12:49
  • @Shouvik I'd like to point out that this requires the user to _manually drag something onto their desktop_. No matter who figures out how to use it, it's not going to be much of a security risk. – Stumpy Joe Pete Sep 21 '12 at 02:09
  • Is there any sort of modernizr plugin that could help achieve this in other browsers? Just brainstorming. – streetlight Jan 29 '13 at 17:51
  • 3
    This doesn't work for me in Chrome 45 on Ubuntu 14.04, or Firefox 41. It just creates little link files on the desktop that point to the URL containing the actual file. – Daniel X Moore Sep 25 '15 at 00:48
  • The link in the answer is broken by me. Can anyone help? – YTG Apr 04 '21 at 08:41
  • @YTG CSS Ninja changed his url https://ryanseddon.com/html5/gmail-dragout/ you're welcome. (10 y later) – MiPnamic Apr 06 '21 at 06:29