FM.AllowFileDragDrop
--------------------

Installs fix for file drag and drop problem.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [FM](component_FM.md) | [7.0](newinversion70.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "FM.AllowFileDragDrop"; Enable { ; TempFolder; DeleteTempFiles } ) 

**MBS**( **"FM.AllowFileDragDrop";** /\* Installs fix for file drag and drop problem. \*/  
**$Enable**; /\* Whether to enable or disable.  
Pass 1 to enable or 0 to disable.  
Default if no parameter is given is enable.e.g. 1 \*/   
**$TempFolder**; /\* Optional; The native path of temp folder to use.  
Leave empty for standard one.e.g. MBS("Folders.UserDesktop") \*/   
**$DeleteTempFiles**) /\* Optional; Whether to delete temp files.  
Default is 1 to delete last file them when next file is to be dragged.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Enable | Whether to enable or disable.   Pass 1 to enable or 0 to disable.   Default if no parameter is given is enable. | 1 |  |
| TempFolder | The native path of temp folder to use.   Leave empty for standard one. | MBS("Folders.UserDesktop") | Optional      Added in version **8.1**. |
| DeleteTempFiles | Whether to delete temp files.   Default is 1 to delete last file them when next file is to be dragged. | 1 | Optional      Added in version **8.1**. |

### Result

Returns OK or error.

### Description

Installs fix for file drag and drop problem.  
When we have a container in FileMaker with e.g. a zip file and drag the file content to the Finder, nothing happens. This plugin functions installs some code which intercepts those file drags and makes them work.  
Internally the file data is obtained and written to temporary folder. The finder can copy the file there and our plugin can later delete the temp file.  
  
Works better with non interactive containers.  
This does not change drag &amp; drop of images.  
  
With plugin version 7.1, PDF drag and drop is also supported.  
### Examples

Allow file drops from container to Finder:

 Set Variable \[$r ; Value:MBS ( "FM.AllowFileDragDrop" )\]  
### See also

- [Folders.UserDesktop](FoldersUserDesktop.md)

### Release notes

- **Version 7.1**
    - Changed [FM.AllowFileDragDrop](http://www.mbsplugins.eu/FMAllowFileDragDrop.shtml) to also handle PDF files.
- **Version 7.0**
    - Added [FM.AllowFileDragDrop](http://www.mbsplugins.eu/FMAllowFileDragDrop.shtml) function.

### Example Databases

- [Drag and Drop/Better drag file from Container](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Drag%20and%20Drop/Better%20drag%20file%20from%20Container.shtml#1ScriptAnchor_)
- [Mac only/Allow File Drags](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/Allow%20File%20Drags.shtml#1ScriptAnchor_)
- [Mac only/Drag File Fix](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/Drag%20File%20Fix.shtml#3ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin 7.1 - Über 4400 Funktionen in einem Plugin](https://www.mbsplugins.de/archive/2017-03-14/MBS_FileMaker_Plugin_71_-_Übe/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 7.1 - More than 4400 Functions In One Plugin](https://www.mbsplugins.de/archive/2017-03-14/MBS_FileMaker_Plugin_71_-_More/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.1pr3](https://www.mbsplugins.de/archive/2017-02-22/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 7.0 - 4400 Funktionen in einem Plugin](https://www.mbsplugins.de/archive/2017-01-23/MBS_FileMaker_Plugin_70_-_4400/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.0pr3](https://www.mbsplugins.de/archive/2017-01-13/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.0pr2](https://www.mbsplugins.de/archive/2017-01-09/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)
- [Allow file drag and drop from FileMaker container field to Finder](https://www.mbsplugins.de/archive/2017-01-09/Allow_file_drag_and_drop_from_/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 8th January 2017 , last changed 17th December 2025

  
[FM.AddErrorMessage](FMAddErrorMessage.md) - [FM.Argument](FMArgument.md)

[HTML Version](FMAllowFileDragDrop.shtml)