11 Replies Latest reply on May 12, 2015 6:18 AM by TSGal

    Insert From URL - inserts file not picture into container field

    databuzz

      Summary

      Insert From URL - inserts file not picture into container field

      Product

      FileMaker Pro

      Version

      13.0v3

      Operating system version

      Mac OS X 10.9.3

      Description of the issue

      I'm downloading some jpg images into a container field using the  Insert From URL script step. Some images are not inserted as a picture but rather as a file so we just see the file icon not the preview of the photo.

      If I view the URL in a web browser then save the image to my computer then insert that picture using the "Insert Picture" menu command the jpg is inserted as a picture successfully and I can see the photo preview.

      Steps to reproduce the problem

      1. create a script that uses the Insert From URL script step to insert from a URL into a container field
      2. perform the script

      Expected result

      JPG from URL is inserted as a picture not as a file

      Actual result

      JPG from URL is inserted as a file not a picture

      Exact text of any error message(s) that appear

      N/A

      Configuration information

      I will send you the URL I'm using via private message as it's a confidential URL.

      Workaround

      Manually save JPG from URL to disk via web browser then insert manually into container field using the "Insert Picutre" menu command.

        • 1. Re: Insert From URL - inserts file not picture into container field
          TSGal

               databuzz:

               Thank you for your post and private message.

               I am able to replicate the issue on Mac OS X 10.9.3.  Under Windows 7, the file will not import.  The workaround works under both Mac OS X and Windows.

               I have forwarded your post along with my findings to our Development and Testing departments for review.  I will contact you when I receive feedback.

               TSGal
               FileMaker, Inc.

          • 2. Re: Insert From URL - inserts file not picture into container field
            philmodjunk

                 Please let us know if there are any identifiable common factors that determine which JPG images will produce this issue.

                 An entry in the Known Bugs List has been linked to this Issue Report. Any Comments/Questions/Suggested Corrections should be posted here or in a new thread. Please do not post such comments to the Known Bugs List thread.

            • 3. Re: Insert From URL - inserts file not picture into container field
              TSGal

                   PhilModJunk:

                   The JPG file referenced on the external web page is 3.5 MB in size.  When the file is saved to disk, it can then be imported as an image.  I will definitely post more information when I receive feedback.

                   TSGal
                   FileMaker, Inc.

              • 4. Re: Insert From URL - inserts file not picture into container field
                nickorr

                     databuzz,

                     Can you run a capture program when you're doing this and compare the MIME types that the server responds with?  My guess is that FMI is trying to determine type from something other than the file extension, and that is what is causing the issue.  I think this may not be a bug, just the way the server is responding, but it could be that FileMaker is not picking up all possible types...

                     Cheers,

                     nick

                • 5. Re: Insert From URL - inserts file not picture into container field
                  databuzz

                       Hi Nick,

                       I think you're on to something here. For the image that inserts successfully the HTTP GET Response has a Content-Type of:

                       image/jpeg

                       For one that fails I get a Content-Type of application/xml.

                       I had a closer look at this and it's returning an xml error payload from the server - even though it's a valid URL and works fine when entered into the browser. I had a closer look at the HTTP GET Request and it looks like the Insert from URL is doing some encoding on the URL. The URL that fails contains this string:

                       CROP+1321076

                       which is getting converted to:

                       CROP%2B1321076

                       which fails in this case. I don't have an control over the source of these URLs so can't get the names changed if they include "+" characters etc.

                       At least I know now what's going on - I've got a workaround using the Troi URL plugin to get the images which is working correctly for these problematic URLs.

                       cheers,

                       Andrew

                        

                  • 6. Re: Insert From URL - inserts file not picture into container field
                    nickorr

                         Andrew,

                         So the real issue is that the IFU step is encoding a url when it shouldn't, and thus giving you an error.  Which is probably related to other issues that I've posted about, but it's good to have another bug report here that documents how the lack of ability to turn off the automatic encoding causes issues.

                         We've got the checkbox for the WebViewer, we need the same checkbox on this step so we can turn off encoding.

                         Cheers,

                         Nick

                    • 7. Re: Insert From URL - inserts file not picture into container field
                      TSGal

                           databuzz and Nicholas Orr:

                           Although I have sent along your comments to our Development and Testing teams, I also encourage both of you to enter this information into our Feature Requests web form at:

                      http://www.filemaker.com/company/contact/feature_request.html

                           Entries into this web form populate a database file that is hosted and monitored by Product Management and Development.  All suggestions are then discussed and considered for future releases.  Although I can easily copy your posts and paste them into the web form, there are a couple of questions asked on the form that only you can answer.

                           TSGal
                           FileMaker, Inc.

                      • 8. Re: Insert From URL - inserts file not picture into container field
                        danshockley

                             TSGal, 

                             I submitted a feature request for Insert From URL to have an option to turn off automatic encoding. However, since the automatic encoding actually causes failures by mangling URLs, I view this as a bug. If a product is going to automatically do something with no way to stop it, there shouldn't be multiple fairly common situations where that automatic function destroys data. This breaks the usefulness of Insert From URL in quite a few situations. Please try to get the Development team to understand that the broken behavior of automatic encoding is causing pain to people trying to integrate FileMaker with web services. 

                        • 9. Re: Insert From URL - inserts file not picture into container field
                          TSGal

                               DanShockley:

                               Thank you for your post.

                               At the time when I last posted on June 10, there was much discussion whether this issue was indeed an issue or as designed.  To cover either decision, I wanted to make sure this issue was also entered into the Feature Requests web form.  Since that time, the decision was that it was an issue, and the information has been sent to Development.

                               TSGal
                               FileMaker, Inc.

                          • 10. Re: Insert From URL - inserts file not picture into container field
                            danshockley

                                 TSGal, thank you for following up. I'm glad to hear that it is considered an issue, and hope it is something that will be improved in the current major version of FileMaker. I know you cannot confirm that, but wanted to express my hope. 

                            • 11. Re: Insert From URL - inserts file not picture into container field
                              TSGal

                              All:

                              This issue appears to be fixed in FileMaker Pro 14.0.1, as there are now options to encode or not encode.

                              TSGal
                              FileMaker, Inc.