There are not linked with the database because there are already like 15,000 photos (might have several per item). It is not possible for users to insert photos in a container. To many.
Can you explain a bit more? Is the main concern here one of file size, that the database would grow too big? If so; that is what the 'Remote Container' feature is about: it keeps the pictures with the database without inflating the databas size. It would solve the problem at hand in a heartbeat.
So I would like to construct the URL following the actual domaine used by the user. But the Get(HostName) function returns the server name, doesn't matter from which URL the database is accessed. Is there a way the get this domain name ?
I think you are going down a wrong path here. Maybe it's a language thing. Do you have many different URLs that all point to the webdirect website? That would not be typical...
Thanks for your answer. The database came from a filemaker 8.5 file if I remember. The path of images was calculated. It's a bit tricky. Users just put jpg files inside a folder. The file name is mapped to the item number. For example, if we have an item named 01.001.01, the photo will be named 01.001.01.jpg. Then if the item has more than one photo, next photos will be added with a letter, like 01.0001.01.A.jpg... Then Filemaker could display the photos computing the file path.
But with WebDirect, this is not possible. So I had to compute the path through a php file. That is working really fine. The php allows me as well to generate thumbnail on the fly to display it inside the form. So the full sized photo is accessed only on a thumbnail click, or when displaying a diaporama.
Here is how in the Web container I construct the URL :
"http://srf-fms.auch.local/data/jacobins/vignette.php?inventaire=" & Fiches candidates::Inventaire & "&couleur=FFFFFF&largeur=258"
In bold is our internal network server address. We have as well an access from internet with a www.foo.com address. If I want to access from internet I have to set the domain to the internet address. So from inside our network, we will access the photos through our internet provider. If I can retrieve the domain from where the user is connected, then I can add it to the URL construction. And then, problem resolved.
If I want to access from internet I have to set the domain to the internet address. So from inside our network, we will access the photos through our internet provider. If I can retrieve the domain from where the user is connected, then I can add it to the URL construction. And then, problem resolved.
So you basically just want to know if a user comes from outside your network or inside your network. It's the "domain from where the user is connected" that confused me.
I would try and grab the IP address of the user; if they are inside your network you will recognize the number scheme and can construct the internal URL, if not then construct the URL using your www.foo.com
So you do have an actual path to each image in your FM database? If you have that path, I'd go with FileMaker's external container storage options (which didn't exist in FM 8.5). You can simply load all of the images into containers using a script, and your problem would be solved with native FileMaker functions. I'll paste a link to a thread with a script for doing just that.
If you use Wim's suggestion, build your URL with a Case statement:
Case ( $IPAddressIsInternal ; http://srf-fms.auch.local/data/jacobins/vignette.php?inventaire=" & Fiches candidates::Inventaire & "&couleur=FFFFFF&largeur=258 ;
http://www.foo.com/data/jacobins/vignette.php?inventaire=" & Fiches candidates::Inventaire & "&couleur=FFFFFF&largeur=258
Well I will try with the IP solution. Thank you.
Thank you dtcgnet. Well I already tried when I was with the FSM 13 release, but WebDirect was not loading files because it was expecting path from the user desktop, not a server folder. Users need to access files directly from the network folder or from the database. And with images in the folder managed by FMS, I still have the issue that FMS does not cache images when generating pages, so each time you refresh or get back to a photo, it recreates a temporary image. This is very slow (both from the server side and the browser side, this last one downloading each time the images). It does not manage thumbnails neither. My solution is faster so I'll keep it until FMS supports caching images.
If you have the images stored externally, but are NOT using FileMaker's external storage capabilities, then you'll have problems with WebDirect, as you mention. If you do use the external storage capabilities, you can set the options for Thumbnails, too. You can select the option to "Generate and store thumbnails for images". Permanent storage is available, so you'd get a good deal of speed.
The external storage capabilities are very powerful, very seamless, and very fast. However, if you've got a solution that works, that's great.
FileMaker has supported permanent thumbnails for a while now. This is the FM13 help: Managing performance with thumbnails
if you are adamant that users need to have direct (non-FM) access to the pictures, without going through FM at all then the Remote Container feature is not for you. RC is not a document management feature, just a storage feature, RC data files need to be treated like the live FM files that they are and should never be touched without going through FM.
One other suggestion...because some of your data records have more than one image associated with them, you might want to consider creating a separate table for just the container field. That way you could have as many images for each item as you wanted.
Also, FM Server is very efficient with the backups. Using RC features means the images don't get backed up every time you do a database backup. When they are modified...they're backed up.
Good luck with whichever way you decide to use.
Great, I will have a look. Thank you.