0 Replies Latest reply on Nov 12, 2014 11:12 AM by honeycomb

    Inserting a file using "Insert from URL" by way of "Perform Script on Server" does not work

    honeycomb

      Title

      Inserting a file using "Insert from URL" by way of "Perform Script on Server" does not work

      Your post

      I can not get "Insert from URL" to insert a file stored on the server (put there by external data storage on a container field) using "Perform Script on Server".

      I can run the script locally (of course, running locally means the file path has to be changed to one that is local to my user account, such as on my desktop, as opposed to within the FM Server directory on my hard drive), but once I set it to "perform script on server" it won't work. I set a variable to the file path and then call that variable in the "Insert from URL" step.

      The following paths do not work:

             
      • "file:///Library/FileMaker%20Server/Data/Databases/Sample/RC_Data_FMS/FMServer_Sample/Files/FMServer_Sample/Projects/_pdf/BillOfSale.jpg"
      •      
      • "file:/Macintosh%20HD/Library/FileMaker%20Server/Data/Databases/Sample/RC_Data_FMS/FMServer_Sample/Files/FMServer_Sample/Projects/_pdf/BillOfSale.jpg"
      •      
      • or any iteration of the above with varying attempts including not including "file:" and other slashes.

      The error returned is 100,"File is missing" . . . which it's not.

      The reason I need to do this is because the GetThumbnail function on a pdf file has apparently been deprecated in FM Server 13. As you know, when a pdf file is inserted as an image, FM Server generates a .jpg and .png file. I need to be able to get the .jpg file of the related .pdf file back to the user.