Jump to content

Getting an image from a Web Viewer to External Container Storage

Recommended Posts

This is kind of a unique situation.

When working with Open Library: You can call for Cover images by creating a URL with the ISBN.. and if the Cover is available, it will show up.


"http://covers.openlibrary.org/b/isbn/" & ISBN::ISBN_Search  & "-L.jpg" will give you the image in a web viewer.  Literally, the image only, which is actually a different URL that is not really able to be created via calculation. Otherwise a simple Insert From URL would work.

If I drag that image to a container.. I predictably get the actual URL of the image.

I want to get that image from the Web Viewer into a Container field with -external- storage.  So I can't paste it, or set field..  :)




Link to post
Share on other sites
  • Replies 11
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Does the attached test work for you? InsertFromRedirectURL.fmp12

Posted Images

2 hours ago, Tony Diaz said:

I want to get that image from the Web Viewer into a Container field with -external- storage.  So I can't paste it, or set field..  :)

Why not? 

BTW, I believe you could script the process of getting the image - or rather the URL of the image, by setting your web viewer to the initial URL and pausing for a while before getting GetLayoutObjectAttribute ( "webviewer" ; "source" ). But I don't see how the storage method affects the methods you can use to populate the field.


Link to post
Share on other sites
2 hours ago, MonkeybreadSoftware said:

Do you use MBS FileMaker Plugin?

I should have known. Swiss Army Knife for FileMaker.

Yes, as soon as I can get some extra cash .. this COVID mess has things all the heck over the place. I've been trying to -not- get too reliant on MBS ... yet. 😉


4 minutes ago, comment said:

But I don't see how the storage method affects the methods you can use to populate the field.

That's kind of just it. I've not been successful with extracting that filename from the webviewer instance.

Given that there's nothing else there.. and even if I capture that URL, I'm not sure it would work because hard coding


and use that with Insert URL it doesn't work at all. But .. I just tried it without the trailing text past the type .ext and I'm back to getting the unable to "Can not write file to the external storage ... which is where I'm ending up no matter what route I take.

I can get it into an internally stored container, but not an external one. Which I kinda of get, as the external container is based around having a filename / INODE to handle.. and the internal container is a blob of data.

So, save it some place with a predictable filename, then insert from file to the container.

Set Field [ ISBN::ISBN_Cover ; ISBN::ISBN_Cover Holding ] 
Set Variable [ $TempFILE ; Value: "File.jpg" ] 
Export Field Contents [ ISBN::ISBN_Image_L ; “$TempFILE” ; Create folders: Off ] 
Insert File [ “$TempFILE” ] 

Something hack like this .. and I -still- get cannot write to external storage.

MBS... Hmmmm...

Using MBS, I get the impression that with either of those functions I'm going to get a 1:1 pixel image of what is in the web viewer. Including the white space. I want the actual asset.

Link to post
Share on other sites

Yes, that does. Now to see what you've got going on there.. :)

The desired end result is to take the largest of what is offered and stick it in my container field, or mine if I need to shoot one with the USB camera ... (MBS Plug In) or Insert From Device for the iPad.

Thanks for the boost in the right direction. :)

Link to post
Share on other sites


.. That's interesting, though. At the end of it all:

Set Variable [ $redirectURL ; Value: GetLayoutObjectAttribute ( "OpenLiibraryLargeImg" ; "source" ) ] 
Insert from URL [ Select ; With dialog: On ; Target: ISBN::ISBN_Cover ; $redirectURL ] 

...and along the lines it seems like I did that exact thing, though I was getting the URL with ''&ext=' appended to it.

// Set Variable [ $ISBN_Image_L1 ; Value: Left ( $ISBN_Image_L ; -4 ) ]  

.... my sorry attempt at brute force figuring out the syntax to drop the extra characters.

Now back to trying to figure out how to get the book title out of that JSON data. Since they don't seem to have a unique identifier for it. (There's several uses of "title: \"" in there)

Thanks! :)

Link to post
Share on other sites

I saw that. :) I'm not hitting them up for very many at all.  I'm not doing anything more than I would by using their search box as a passive user. If this were a solution being done for distribution or deployment in a working environment..

Otherwise, what I'm looking for on there I'd hardly even begin to call anywhere near a smidgen of 'bulk'. I'll probably end up providing more than not overall. 

Link to post
Share on other sites
  • 1 month later...
On 5/25/2020 at 3:54 AM, comment said:

Does the attached test work for you?

InsertFromRedirectURL.fmp12 164 kB · 9 downloads

On this, you're getting the image into a web viewer first, then inserting from that URL, to the container.

It works, as little as 1 second delay is fine, too- hasn't failed in any testing. Though yes, I realize it may need more .. so for testing the 5 second pause is what I fall back onto just to make sure.

With some slight changes, it's still good: (I have the direct URL already stored in a field).



So taking that same thing and using it here to get the screenshot and thumbnail image. (Yes, I could probably just have FileMaker create that thumbnail too I suppose)



For some reason, I have to do this twice to get it to work. The first time it runs, I'll get this:


 You can see the images are in the web viewer elements, the second container field is selected and thats all I get...
(If I right-click in the web viewer, to move it back to no image showing, then itl won't do it on this next run. )

So if I run it again it will work the second time. As long as those web viewers show the image loaded like it is above.




The end result is, I'd like to have it get those images that the URLs came from in the data below..  why there needs to be the web viewer in the flow doesn't make sense, but whatever, fine. But it's not consistent either.

Seems like I could probably save the file to the local disk via cURL and then insert the file into the container.. but then that's twice the disk access. Shouldn't it just be able to get the image from the URL .. and actually put that into the container, not putting an icon or URL into the container instead?


Set Variable [ $screenshots ; Value: JSONGetElement ( Items::JSON_Blob_Detail ; "screenshots" ) ] 
If [ not IsEmpty( $screenshots ) ] 
	Set Field [ Items::JSON_VariableView0 ; $screenshots ] 
	Set Variable [ $PLATFORM_ID ; Value: "5" ] 
	Set Variable [ $MOBY_ID ; Value: Items::Moby_ID ] 
	Set Variable [ $n ; Value: ValueCount ( JSONListKeys ( $screenshots ; "" ) ) ] 
	Freeze Window

	Go to Layout [ “Moby_Screenshots_Meta” (Moby_Screenshots_Meta) ; Animation: None ]
	Set Variable [ $existingCaptions ; Value: ExecuteSQL ( "SELECT Caption FROM Moby_Screenshots_Meta" ; "" ; ""  ) ] 
		Set Variable [ $i ; Value: $i + 1 ] 
		Exit Loop If [ $i > $n ] 
		Set Variable [ $record ; Value: JSONGetElement ( $screenshots ; $i - 1) ] 
		Set Variable [ $caption ; Value: JSONGetElement ( $record ; "caption") ] 
		If [ IsEmpty ( FilterValues ( $caption ; $existingCaptions ) ) ] 
			New Record/Request
			Set Field [ Moby_Screenshots_Meta::Platform_ID ; $PLATFORM_ID ] 
			Set Field [ Moby_Screenshots_Meta::Moby_IDfk ; $MOBY_ID ] 
			Set Field [ Moby_Screenshots_Meta::Caption ; JSONGetElement ( $record ; "caption" ) ] 
			Set Field [ Moby_Screenshots_Meta::Image_URL ; JSONGetElement ( $record ; "image" ) ] 
			Set Field [ Moby_Screenshots_Meta::Thumbnail_URL ; JSONGetElement ( $record ; "thumbnail_image" ) ] 
			Set Field [ Moby_Screenshots_Meta::Thumbnail_URL ; JSONGetElement ( $record ; "thumbnail_image" ) ] 

			Set Variable [ $redirectURL ; Value: Moby_Screenshots_Meta::Image_URL ] 
			# Stand in code, figure out how to make it work, then put that here.
			Insert from URL [ Select ; With dialog: Off ; Target: Moby_Screenshots_Meta::Screenshots ; $redirectURL ] 
			Set Variable [ $redirectURL ; Value: Moby_Screenshots_Meta::Thumbnail_URL ] 
			Insert from URL [ Select ; With dialog: Off ; Target: Moby_Screenshots_Meta::Thumbnails ; $redirectURL ] 

		End If
	End Loop
	Go to Layout [ original layout ; Animation: None ]
End If


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.

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 GAltanis
      Dear users,
      I have three tables for three relevant layouts. Each one has separate table and tables are related with only one field.
      The scope is to show on the 2nd and 3rd layout the records that related with the 1st one. Here are some screen shots with what I need to do. Actually, I need to have on the seconf layout ("Orders from suppliers") the related records from the first one ("Suppliers list")
      Thank you thank you


    • By epatrick
      I find it odd that FileMaker is so intuitive yet hides access to the file name of the data source during importing. It looks like the only way I have found based on posts on the forum is to import the Data Source file as a reference into a container field. That is an extra step that shouldn't have to be done since FileMaker sees the Source file name during multiple points in the import process. Here are three dialogs where it's seen during import. There has to be a way to use the input file name with some kind of Get Function.  Please help!

    • By 34South
      I previously used ODBC Manager (32 bit)  to great success importing data directly from Filemaker Server to JMP. I recently upgraded to Catalina (MacOS 10.15.5) and knew that one of the casualties would be this ODBC utility. I downloaded the 64 bit ODBC manager from Actual Technologies and successfully installed it but get the following message when trying to open an FM database from within the ODBC interface in JMP:
      dlopen(/Library/ODBC/FileMaker ODBC.bundle/Contents/MacOS/fmodbc.so, 6): image not found
      I have navigated to Actual Technologies' web site believing I should download an ODBC driver but this comes at a hefty price tag, especially when converted to my local currency. Given the increasing costs of maintenance contracts and SSL certificates I had hoped to avoid further expenditure. Do I really need this and is there an alternative?
    • By droid
      I've been saving various files - mostly pdfs - in FM container fields, for years. A script triggered by clicking in the field allowed the field to be exported for viewing.
      Recently I upgraded to FM18, and now when I click in the field, I'm told "container fields cannot be exported"!
      Is there a new way that I should be doing this? Thanks.
    • By ggt667
      I can ping my PDF document server from Terminal, I can connect to the PDF document server from all browsers apart from Safari, my default web browser is FireFox, I also tried to change to Chromium and Opera as the default web browser. WebViewer has the same symptoms as Safari, server not found.
      $ ping -nc 1 document PING document ( 56 data bytes 64 bytes from icmp_seq=0 ttl=64 time=0.002 ms --- document ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.002/0.002/0.002/0.000 ms FileMaker says ’Couldnot connect to the server.’
      The issues is easily solved by creating a new MacOS X user, and log in to that user, however I would rather like to fix the current user not having to migrate all other application settings. Is there some dns cache specific to Web Viewer and Safari?
  • Who Viewed the Topic

    8 members have viewed this topic:
    Steve Martino  comment  Blaze  mr_vodka  fmtaher  Fitch  Ocean West  bcooney 

  • Create New...

Important Information

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