Cancel file dragging on Mac

Solution 1:

You can drag the file to the menu bar (top bar) and release it. That will cancel the dragging in any app (afaik).

Solution 2:

Whilst dragging you can command-Tab (without releasing your click-and-drag). If you command-Tab back to Finder you can then click escape. If you command-tab to any application which will not accept the dropped file then you will receive a beep alert and the drag-and-drop will be cancelled.