Jump to content

Script to copy image from web link into container field


Recommended Posts

  • Replies 15
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

That's what the "insert from URL" script step is for.

But we'd have to know more about what the source URL / web site does or allows to help you better.

Link to post
Share on other sites

Do a quick test to verify that the file is actually a picture:

- right-click the container and do "export field contents" and save it with the proper extension that you know it is (jpg? png?)

- inspect the file in your OS, open it

- if it is a picture then right-click the container again and choose "insert picture" and select your file

if this all works then you have your routine to script:

- use the "insert from URL" to insert into a *global* container

- use the 'export field contents' script step to the temporary folder using a placeholder file name

- use the "insert picture" script step to grab the file back and insert it into the proper destination container

Link to post
Share on other sites

None.

Except that in general terms grabbing assets from a URL like this isn't a good way to integrate.  Does the site have an API that will give you the data in a proper form?

Link to post
Share on other sites
50 minutes ago, stan111 said:

doesn't work as expected

It works as expected with the link you posted above. If it doesn't work with another link, then post the URL.

 

Link to post
Share on other sites
Posted (edited)

that's what I get when use the link above. That's odd if you get a different result.

3.png

Edited by stan111
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By charlitoA
      Hey Everyone
       
      We are having this issue with the change of any of this variables
      IOS 13
      FileMaker 18
      FileMaker Server 18
      FileMaker Go 18
       
      We have a Layout for FileMaker go to upload photos from an iPod Touch or iPhone Pro 11, and when we use a script to take the photo directly from the camera works perfectly, but when we use the another one that has to open the library from the device it will happen either of this 2 things
       
      1. It will duplicate on the mini preview the last "good" picture and when try to maximize the picture nothing shows up
      2. It will happen this weird "no signal tv" ( that's how I call this lol ) image and there's no way to see the picture
       
      Discoverys
      On MacOS the pictures looks great, also con iOS , it seems that windows it's not detecting as a valid file when the photo is taken from the library of the iPhone or the iPod Touch (this never happen in older versions of filemaker or iOS)
       
      Any ideas ?

    • By stan111
      Gents, I have an excel price list with header fields. I want to import it into a newly created FM database. Is it possible to make FM use those header fields instead of me manually creating corresponding fields in FM?
       
    • By everythingFileMaker
      The short video linked below shows a radio button value list that shouldn't work because the 2nd field is an unstored calculation however it does some of the time and others not. I've been noticing this for some considerable time and I'd love to get to the bottom of why. Any thoughts will be greatly appreciated. https://www.screencast.com/t/7CWCfpqfeP
    • By genious
      I am finding that my new install of FM19 is very slow.  when I go into manage database I have to wait for the fields to populate for about 30 seconds.  Is anyone else getting this slow behavior?
    • By Ismail AlAbdulmohsen
      Hello; is there a function or a calculation I can use to Convert between Hijra to Gregorian Date in my FM database? 

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.