# Detect drag and dropped files from python?

I want to write a python script which downloads images which are drag and dropped into blender from a browser. However, I don't know if this is even possible.

Is it possible to get the following in python?

• When an image is dropped into the image editor.
• The location (URL) from the dropped file.

And then create an image datablock from the stored image data?

Is this possible?

There is bpy.ops.object.drop_named_image, that looks like a modal operator. It supposedly adds a dropped image as an empty, but does nothing when executed and crashes Blender when invoked, so I think it's an internal operator just like bpy.ops.mesh.drop_named_image. So there's no directly-callable Python operator for drag-and-drop either.