5 Replies Latest reply on Jan 22, 2013 4:10 AM by OllyGroves

    Drag and Drop vs Insert File

    StevenRubenstein

      Environment: FMP12 Mac and PC

       

      I have a layout where the user can upload a PDF into a field and, on a separate tab, interact with it. So I have two container fields, one that I want to display the thumbnail/filename, the other that I want to display the interactive view.

       

      If the user drags and drops into the first container field, it works fine. The file is uploaded and displays as a thumbnail in one, and a readable PDF in the other.

       

      However, if they upload by right-clicking and choosing Insert File, it shows up as a thumbnail in both containers. Please advise.

        • 1. Re: Drag and Drop vs Insert File
          phillipkurpe@pkinformation.com

          You have to define your insert to allow interaction.

          • 2. Re: Drag and Drop vs Insert File
            StevenRubenstein

            The latter is defined to allow interaction, the former is not.

            • 3. Re: Drag and Drop vs Insert File
              raybaudi

              Try with this calculation for the auto-enter option of the container:

               

              "image:" & Substitute ( Self ; "file:" ; "" )

               

              It's not completely logical, but works.

              • 4. Re: Drag and Drop vs Insert File
                charleshuff

                "image:" & Substitute ( Self ; "file:" ; "" ) in the autoenter portion of the container file gave me file not found errors with 'do not replace' unchecked...  with it checked I can see no difference in standard behavior?

                 

                I am using external open storage...

                 

                =====update====

                 

                still investigating....   I used a normal container field (local) and it appears to work.   What's more, changing the auto enter to "file:" & Substitute ( Self ; "image:" ; "" ) works too, in reverse stopping the display of thumb nails.

                 

                awsome tip....

                 

                now if only I can figure out how to make it work with external open storage.....

                 

                so far, no joy....   It seems you are not allowed to use "self" with external storage of containers...

                 

                bummer...

                 

                Charles

                • 5. Re: Drag and Drop vs Insert File
                  OllyGroves

                  If user right clicks 'Insert File' instead of file type (i.e.. 'Insert Picture') you won't get the image preview, just an Icon. 

                   

                  I've been guiding users against using 'right click' functions in FM12 eg. insert file/insert picture/insert movie etc. Believe only there for backward compatibility.

                   

                  In FM12 use 'Insert File' script step (behaves differently from right click insert file).  Need to ensure 'Display: Content of File (when Possible)' is chosen in the dialog settings. 

                   

                  This new script step takes care of file type & interactivity for any file type supported.  If user drag & drops seems essentially using this new script step behaviour.  Can attach this script to a button and place near the container.

                   

                  I did briefly mess around with security settings & allow field entry settings to try and remove right click options but still allow drag & drop but couldn't find setup to allow both so have just put a obvious 'Insert File' button there for now.