Jump to content
Server Maintenance This Week. ×

Using a Supercontainer field in PHP web publishing site


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

Recommended Posts

I have a site that I am trying to migrate to use a supercontainer field rather than the embedded image.  Right now, I am using this to show the image:

<img src="<?php echo fmsImageURL('Image Browse',$find_record_row->getRecordId()); ?>" alt="" name="rug" width="150" id="rug" />

If "Image Browse" is the old content, how do I change that to use the supercontainer content?  Here is the field as it appears in my FM db:

"http://my.server/SuperContainer/Files/rugs" & Inventory::Rug Number
&
"?style=showdelete+noscroll+title+info"

Clearly, I don't know what I am doing here - so, newbie apologies - I was hoping to just swap out a field name...?

 

thank you for any help. 

Link to comment
Share on other sites

  • 2 weeks later...

I believe we have resolved this issue in a support ticket, but just in case:

 

You can achieve the same behavior as SuperContainer in a web viewer in FileMaker in your PHP page by creating an <iframe> that points to the same SuperContainer URL you would use to display the image associated with the record in FileMaker. So if you had an image uploaded to your local SuperContainer server at the file path "/rugs/12345", your iframe would look like this:

<iframe src="http://my.server/SuperContainer/Files/rugs/12345"></iframe>

Link to comment
Share on other sites

  • 1 month later...

Hi Joe

 

1. I am a new user to Supercontainer also. I have added an iframe and can upload a file put I want to know how I can capture on the page what the filename is that was uploaded so I can then link this in the fm database. The custom php page is a form where the users are making a purchase request and they need to add the quote if they have one. It is doing an "add" record so I do not have a recID at the point they are entering the form data put I was thinking if I could obtain the file name then I could post it to a fm field when it doe the sumbit?

 

I have tried looking at the PHP Documentation generator but I cannot seem to integrate it and wonder if that is because I am using the iframe?

 

2. I also tried adding nodelete to the url as suggested in another post on this forum but the delete button still shows?

<iframe src="http://localhost:8020/SuperContainer/Files/Quote/style=nodelete"></iframe>

Have I added it correctly to the url?

 

3. I was also wondering if you knew of any examples where more than one upload is allowed?

 

Many thanks for your help.

Link to comment
Share on other sites

Hello,

 

1. There are two ways you could retrieve the filename of the uploaded file:

1) You can use the SuperContainer Companion plugin with FileMaker Server or FileMaker Pro. The function is called SCGetInfo: http://static.360works.com/plugins/SuperContainer/plugin-documentation.html#SCGetInfo 

2) You can use the SuperContainer PHP library. The "supercontainer.php" file included in your download at 360Works+SuperContainer-2_89/Support files/PHP/supercontainer.php needs to be included in your code. Here is some documentation on using SuperContainer commands in PHP: http://static.360works.com/plugins/SuperContainer/php-documentation.html

 

2. You should put a question mark between the path to the file and the additional parameters. Here is the correct URL to remove the delete button: http://localhost:8020/SuperContainer/Files/Quote?style=nodelete

 

3. Do you mean uploading more than one file to a directory? SuperContainer stores files in a "one file - one folder" structure by default, but it is possible to store more than one file in a directory using the SingleFile URL. Check out this documentation on using "SingleFile" instead of "Files" in your URL: http://docs.360works.com/index.php/SuperContainer#SuperContainer_URLs

Link to comment
Share on other sites

This topic is 3768 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.