Skip 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.

Reference images from shared hosting

Featured Replies

  • Newbies

Hi,

how do I reference images from a shared hosting server. Images are stored in a container field named imagecontainer. I created a calc field named testcontainer with "Calculation result as Container" and inserted in the calculation: Substitute ( imagecontainer ; "imagemac:/GV/media_database" ; "http://myserver.net/media_database" ) to rewrite the path to my hosting server where the image is located. The URL the field generates is correct. For testing purposes I created a calc field named testpath with "Result as Text" to output the path of my image container (field: testcontainer). If I right-click on the field testpath and choose "Open http://myserver.net/images/image01.jpg" the file on the hosting server shows up correctly in the browser. The problem is the container testcontainer that doesn't display the image referenced from the shared webserver at all. I still get 'The file cannot be found' even the path seems to be correct. What did I do wrong?

Uli

A Container field (or calculation for one) does not use the "http://" syntax. A Web Browser object could.

The container field uses more like what you started with: "imagemac:/GV/media_database/some image.jpg"

This is assuming that "GV" is a mounted drive/volume (with OS file sharing on). If it is not (and cannot be) a shared volume, then you could use your first try, a web path calculation, for a Web Viewer.

If you need a cross-platform path, you can either calculate the prefix and drive (as that's the only part that's different), or write 2 paths (one for Mac, one for Windows) on 2 separate lines (carriage return separated; ¶, that's Opt-7; just separating them by hitting a carriage return does nothing really; whitespace is ignored by the calculation engine). The multiple lines mean, to FileMaker, "try this one first, then this one, then this one...".

Or, something like (off the top of my head, hopefully correct; I like the path up into smaller pieces, hence the Let():)

Let ( [

file_name = whatever FileMaker field has the name with extension; // file name.jpg

folder_file_path = "media_database/" & file_name; // could get the folder path from a field

sys_plat = Abs (Get (SystemPlatform)); // 1 is Mac, 2 Windows

server_name = Case ( sys_plat = 1;

"Mac server name/path"; "Windows drive/path";

) // Mac & Windows may have different

prefix = Case ( sys_plat = 1; "filemac:/"; "filewin:/" )

];

prefix & server_name & "/" & folder_file_path

)

  • Author
  • Newbies

Thank you Fenton,

hmm, I don't prefer the webviewer approach. In my scenario different people around the world should have access to view the images with FMP. Since I don't have a own server what would be the best solution? If I have a shared volume, in my case I turn File Sharing on in OS X to share a folder with all my images would that work? Or how else could I get a mounted volume for people to access it worldwide that are not in my network?

Thank you.

Uli

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.