9 Replies Latest reply on Feb 28, 2011 2:20 PM by Montpelier

    Inconsistent file launch using Open URL

    Montpelier

      Title

      Inconsistent file launch using Open URL

      Post

      We are using a database hosted on a server, one of the functions of which is storing a thumbnail of an image. The thumbnail is supposed to act as a button to launch the image file when clicked, and the script for the button is a basic Open URL [constructed filepath here]. 

      The problem is that not all the image files are opening. Some images open for some users and not others. I personally can't open a single image using Open URL. There doesn't seem to be a pattern to which files do and do not open.  

      I've tried running the script with "perform without dialog" unchecked, and if I copy and paste the generated filepath into my browser, the file opens fine. If I click continue, nothing happens. 

      All computers, and the server computer, are running Windows XP. Everyone's using FMP 11, and we're running the latest version of Server 11. The filepaths should parse to the server machine (and apparently do, beacuse some of the images open).  All users have read/execute permission to the folders in which the image files are stored.

      Does anyone have any idea what could be preventing some of the files from opening? Is this a script thing, a file thing, or a network thing?

      Thanks,

      MB

        • 1. Re: Inconsistent file launch using Open URL
          philmodjunk

          There are several variables to check. You don't indicate how you calculate the file path here. Are these images all stored by reference? Is the filepath in the container field used to compute the filepath for the URL?

          I assume from your description that you can see the image in the container field. If these are store by reference, then the file path inside the container field is a valid path or you wouldn't be able to see the image. That also confirms that the shared directory where you keep the image files is mapped/mounted identically for all your users.

          Since everyone is using Windows XP, you aren't dealing cross platform file paths here...

          There is another way to open the image files that doesn't require calculating a file path to the image. Your script can use export field contents to export the file. A convenient location to export it to is your users Temporary folder which can be computed from the Get ( TemporaryPath ) function.

          • 2. Re: Inconsistent file launch using Open URL
            Sorbsbuster

            I assume that the images are all linked 'By reference only'. It is very easy for the workstation doing the linking to use a path that is not available to everyone, consistently, on the network.  And extreme example is that they link to a file on their local HD.  The record will link and display perfectly for them, and indeed every time they look at that record from their computer.  But no other user will be able to see it.

            All you have to do is have one user link to a common folder that they map as their 'Y' drive while someone else calles it their 'Z' drive, and you have exactly the scenario you describe.

            One de-bugging step is to show the Container Field with the image in it as a text field and see what the exact path name is to the image it links to.

            • 3. Re: Inconsistent file launch using Open URL
              Montpelier

              PhilModJunk: the filepaths for each folder are stored in a table called backmaster, and the script to launch looks like this: 

              Open URL [ back_master 42::back_sources_file_path & Case ( not IsEmpty (images::images_archaeology_subdir); images::images_archaeology_subdir ) & images::images_file_name_FULL ]   which results in something like this: file:\\Mont-app\curatorial\FM-Data\FM-Files\Objects\655.bmp

              Yes, the field in which the thumbnail is stored is just a reference. The script uses Insert Picture to populate the container field images::images_thumbnail. 

              I'll give the export field contents a try - does that still work with a reference?

              Sorbsbuster: all images are, by protocol, stored on server-based shared files, and the filepaths are stored and calculated in a way which means that the letter assigned by a user for mapping has no effect on the location generated by the script.  And since the thumbnails all show up fine, I don't think it's an initial mapping issue. 

              • 4. Re: Inconsistent file launch using Open URL
                Montpelier

                I did  give the export field contents script step a try, but since the information stored in images::images_thumbnail is only a reference, I just got a text file, not the image itself.

                The most frustrating thing about this issue, besides the fact that it does not occour consistently, is that if I deselect "Perform without Dialog" for the Open URL script step, take the URL in the dialog box and paste it either into a browser (Chrome, IE, and Firefox) or into Windows explorer, the image file opens just fine! However, even with the dialog, if I select 'Continue', nothing happens. 

                • 5. Re: Inconsistent file launch using Open URL
                  philmodjunk

                  I did  give the export field contents script step a try, but since the information stored in images::images_thumbnail is only a reference, I just got a text file, not the image itself.

                  I'm confused by that. What "text file" would that be?

                  I just now opened a file that has a container file stored "by reference". Exporting the field contents opened the file as expected.

                  • 6. Re: Inconsistent file launch using Open URL
                    Montpelier

                    Well, not a text file, but an unreadable file - when I try to open it with an image viewer (Picasa or microsoft's default), I get an error. Opening it with notepad gives me "size:121,133image:40_01.jpgimagewin://Mont-app/curatorial/FM-Data/FM-Files/Objects/40_01.jpg"

                    Edited: using some variables, I was able to get it so an image does download and open. Thank you, it's a very helpful workaround. Unfortunatly, it still doesn't resolve the initial question.

                    • 7. Re: Inconsistent file launch using Open URL
                      Montpelier

                      UPDATE

                      I have been able to determine that the launch issue is entirely related to which computer one is using. It doesn't matter which account is logged in, either to the machine/network or to the FileMaker database. So there must be something in the settings on the computer which are preventing FileMaker from opening a URL. I've checked the Firewall (it's off) and the intranet settings. Anyone have any ideas what might be causing the conflict?

                      • 8. Re: Inconsistent file launch using Open URL
                        philmodjunk

                        If the file is located on a shared directory, all client machines must have direct access to the file via a consistent file path. Since windows and Mac systems identify/map/mount shared volumes differently, you'll need to compute a file path to use in the Open URL step that's appropriate to the current client machine's platform if you have both Mac and Windows client machines.

                        • 9. Re: Inconsistent file launch using Open URL
                          Montpelier

                          I don't believe it is a mapping issue, because we use the same mapping, and almost the same script, to open pdf and doc files, and I have no problem with that. It's something specific to image files.