Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

Storing JPEG from given URL to container field

Featured Replies

Is there a way to retrieve a JPEG from a given URL (for example http://mySite/myPic.jpg) and store it in a container field?

I'm not very good in applescripting, but I think that can be done...

Thanks in advance for any help!

Paolo.

Take a look at the Troi URL plugin. I messed around for a few days trying to get some internet data into a field. Couldn't get it done reliably. I then found the Troi plugin and had it doing what I needed in about 10 minutes.

Dan

  • Newbies

In OS X, you can use URL Access Scripting to download the file, as below (in this example it downloads it to your user Documents folder):(

set docFolder to path to documents folder as string

set theFile to docFolder & ":temp file.jpg"

tell application "URL Access Scripting"

activate

set imageURL to http://mySite/myPic.jpg

try

download imageURL to file theFile with progress replacing yes

end try

try

quit

end try

end tell

You can then put a reference to the image file in your container field, as below:

tell application "FileMaker Pro"

set data of cell "Container" of current record of database 1 to file theFile

end tell

A possible problem with the above approach is that it does not put the actual data for the image in the FMP container, just a reference to it; move the original file, and you lose the image. AFAIK, there is no way to store the data in a FMP container using AppleScript without some help. If you want to store the data, you can use the GraphicsImporter OSAX (available for free at http://osaxen.com/graphicsimporter.html or at http://www.azug.gr.jp/~h-abe/freeware/gio/index.en.html), like so (after downloading the file):

set theImage to giconvert file theFile

tell application "FileMaker Pro"

set cell "Container" of current record of database 1 to theImage

end tell

Good luck!

  • 4 weeks later...

Hi try this

Perform Applescript

( set the image_name to cell "image_url" of current record

set this_URL to (the image_name)

set the destination_file to ((path to desktop as string) & "image.jpg")

tell application "URL Access Scripting"

download this_URL to file destination_file replacing yes

end tell )

Go to field ["image"]

Insert Picture ["image.jpg"]

exit record

  • Author

thanks,

with url access scripting I did the job.

now I'm facing the problem that the stored images are much much bigger (in bytes) than the original jpeg file. Any idea??

Try turning off "store compatible graphics" in the FMP preferences. If you do, though, images pasted into the container by a PC client won't display on a Macintosh.

  • Author

>Try turning off "store compatible graphics"

it works!

>images pasted into the container by a PC client won't display on a Macintosh.

who uses pcs???

"who uses pcs??? "

LOL

people who can use more than one button on a mouse! blush.gif

Anyone found a soulution for this other than mr. Troy?

I tried to get from a url for days before I found the Troi URL plugin. I thought I might be able to if I messed around with Windows long enough, but it was so complex that I knew I'd never make it reliable for my end users. There was no way I'd be able to get them to set it up right, and I don't think it was going to run on 95, 98, or ME. So I went with Troi and I'm glad I did. The only problem that I've had is getting it to work in POST mode. But it works fine in GET mode, and that's all I've needed so far.

Dan

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.