May 11, 200421 yr Hi there, i have a picture database that store picture into container field. Now i need to post it to web so that user can view this all pictures on the web. I normally using php with help of FX to link with fm. But I have not sure how to link with container field. Regards, Henry
May 14, 200421 yr Hi, Henry! I am only learning php just now, but I thought I'd mention that most cases of picture-serving I have heard of use PATHS to pictures rather than use container fields to store pictures. PATHS keep your db relatively small and quick. As to showing a container field on the web, should it not be the same as showing any other data field? --ST
May 15, 200421 yr Author I know save path will be more easy, but just want to find out how to use container field. I still can't find out the way to show the picture. Regards, Henry
May 19, 200421 yr Hi Henry We are currently using FX to serve a picture db which, due to its history, holds the images in container fields. As you have found out, the XML data that FX displays doesn't include the container field (although it can contain a path to an image). However it can contain the unique RecordID belonging to each FMPro record. FX can then pull up the image (as the FX demo does) with the URL: <IMG SRC="http://IPaddress or domain name of FMPro machine/FMPro?-db=database.fp5&-RecID=12345&PICTURE=&-img"> where RecID is the Record ID and PICTURE is the name of the container field.
May 26, 200421 yr It's working great ! Thank you PBainBridge ! I was searching for such solution ! It's help me a lot ! :
May 26, 200421 yr Glad to be of help! We're actually looking at exporting all the images (with ExportFM plug-in), as we have found that serving the images direct from FMPro creates quite a slowdown on page loading times. Bear it in mind if you're just starting to create your database - as Steve T. pointed out, PATHS are definitely more efficient. Phil
May 26, 200421 yr In fact, I'm actualy using ExportFM for publishing images, but I don't like this solution. However, it works, but for some solutions, it's not easy to find the best way to transfer the images exported to be in the good place for web publishing. I hope that the slowdown page loading would be more optimised with FileMaker 7 Server Advanced...
June 5, 200421 yr Newbies Hi.. I have a small database that I am working on that I want to contain a picture. On the recommendation of this forum I'm not going to put a picture in a container filed.. but rather upload the pictures I want directly to my webserver.. than have a field called "Picture" that actually contains the absolute URL of the picture I want loaded in its place. Is this possible with PHP/FX.php? I have been using VisualFX for Adobe GoLive but there is no drop and drag tool to do anything like this.. or anything to do with graphics for that matter. Thanks.
June 5, 200421 yr Re: absolute URL of the picture I would use just the filename. The URL can be constructed by the PHP script (or the fixed html). All the best. Garry
June 7, 200421 yr Hi, here's how we organise our library pictures There are about 40,000 images in the library and we keep: - Thumbnails as .jpg files on the webserver - High-resolution repro files in CMYK format (can be up to 70-80mb easily) on a separate X-Serve with a *big* RAID, stored as .sit files To identify the images, we use the database record number, so the low-res is 12345.jpg and the high-res 12345.sit To avoid huge directories and make backups easier, we create a new folder for every 500 images (you could automate this, we've never bothered), and use a calculation field to create the right folder path, like: --------------------------------------------------- If(record_number>20000, Left(record_number,2) &If(Right(record_number,3)>500,"501","001") &"_" &If(Right(record_number,3)>500,(Left(record_number,2)+1)&"000/",Left(record_number,2)&"500/") &record_number &".jpg", If(record_number>10000 and record_number <20001, Left(record_number,2) &If(Right(record_number,3)>500,"501","001") &"_" &If(Right(record_number,3)>500,(Left(record_number,2)+1)&"000/",Left(record_number,2)&"500/") &record_number &".jpg", If(record_number>1000 and record_number <10001, Left(record_number,1) &If(Right(record_number,3)>500,"501","001") &"_" &If(Right(record_number,3)>500,(Left(record_number,1)+1)&"000/",Left(record_number,1)&"500/") &record_number &".jpg", If(record_number<1001 and record_number >502, "501_1000/" &record_number &".jpg", "0_500/" &record_number &".jpg" )))) ---------------------------------------------------------- gets you: 12001_12500/12345.jpg which gives the right path to the piccy. You then just add the part of the URL which stays constant to the front of that. Of course, there's another caculation to get the high-res file. regards, jeff
July 7, 200421 yr This is a Path construct/syntax question (I think). This works for displaying an image: echo ("<td><img src="http://www.mysite.com/images/red.jpg"></td>n"); I created a calc in my FM db named 'image_c' that calcs to the same URL shown above in text format. But, the following does not work: echo "<td><img src="{$list['image_c'][0]}"></td>"; Is this the correct way to define the path when the field calculation defines the URL? Thanks for any assistance.
July 8, 200421 yr Whoops. It seems the example that I posted as not working actually does work. My apologies and please excuse the confusion. I think that in just asking a question I answer myself in the process. It seems that when I posted and reviewed before posting, I saw a 'typo', and corrected it online. So once I corrected my 'typo' in my code, it worked. Once again, my apologies for the confusion.
January 13, 200619 yr Greetings all, I know this is an old thread, but does anyone know if this trick works in FMP 8.0 and if so what the syntax for it is? Thanks in advance. Hi Henry We are currently using FX to serve a picture db which, due to its history, holds the images in container fields. As you have found out, the XML data that FX displays doesn't include the container field (although it can contain a path to an image). However it can contain the unique RecordID belonging to each FMPro record. FX can then pull up the image (as the FX demo does) with the URL: where RecID is the Record ID and PICTURE is the name of the container field.
January 18, 200619 yr That syntax does not work in FM8 that I know. You need to use image proxy from FX.PHP to get it done. As mentioned - it is a good idea to store pictures in a directory and link to them rather than accessing the container field. Also - although imageproxy is the way to go, it would be nice if to develop a very simple php function that got the image from the container field and displayed it. Something like: Here is an image <? getimage($recid, $fieldname); ?>
February 16, 200619 yr FMandPHP has a simple way to do this: echo ""; more at: http://www.support.schubec-hosting.com/viewtopic.php?t=110
Create an account or sign in to comment