I'm grabbing images for a client from their old database. I have an fmp12 where one field has the image url, the next field is an empty container. I want to insert the image from the URL into the container field.
I'm using Insert from URL with the urls for the images. However it only works sometimes.
This link works fine:
This link doesn't work:
I get error 10 "Requested data missing". When I use these links with a browser, I get the exact same behavior with both- it downloads the image. I tried fooling with the ?fd=1 parameter, but no luck.
Any ideas of how I can get this to work?
Try using the following flag in the cURL options that you set up for the Insert From URL step:
The link that hasn't been working does not directly return an image. Instead, it returns a redirect URL which can be used to fetch the image. A browser will automatically follow the redirect, and so the process of using the original URL to fetch the image just seems to work seamlessly when you load the URL into the browser.
By using the -L option in cURL, you are telling cURL to go ahead and follow the redirect, just like your browser does.
Hope this helps,
p.s. The "-L" option is shorthand for "--location". Using "--location" should also work (instead of "-L").
Steve- You've saved my Sunday. Thank you so much!