Jump to content

This topic is 6924 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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.

Posted

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

Posted

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

  • 2 weeks later...
  • Newbies
Posted

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.

Posted

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

  • 5 weeks later...
Posted

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.

Posted

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.

  • 1 year later...
Posted

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:

FMPro?-db=database.fp5&-RecID=12345&PICT

where RecID is the Record ID and PICTURE is the name of the container field.

Posted

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); ?>

  • 4 weeks later...
Posted

FMandPHP has a simple way to do this:

echo "".$FM->getMedia(";

more at: http://www.support.schubec-hosting.com/viewtopic.php?t=110

This topic is 6924 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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