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

Featured Replies

Just wondering if anyone has experience using $sc->download() in CWP/PHP. The documentation is sparse at best. I've been playing with this a bit, but haven't gotten it to work (trying to download an SC file to my local drive). I have the cURL library activated in PHP, so that should not be an issue. I think the main issue I have is trying to figure out what the proper syntax is for the destination. I tried what was in the example ('/tmp'), but got a permissions error. Ideally I'd like to have things go to the Downloads folder on the user's machine - has anybody done that?

 

More broadly, the ultimate goal is to allow users to select a set of images from a web page, and be able to zip them up and download them to the Downloads folder. I'm thinking that I would probably need to download the files into a temp directory on the server & then zip them & download them using php. Either that, or perhaps request some custom coding by the 360Works folks...

 

Any suggestions on how to approach all of this would be greatly appreciated.

 

Dave

Hi Dave!

 

I have a web portal that I use to serve up "job site photos" to my vendor.  

 

My Filemaker Server is completely inside my firewall and the web application server "straddles" the firewall.   I use SuperContainer internally for all of my images.    As such, it works pretty easy to pull the SuperContainer managed images from the Filemaker Server to my (linux) web server.

 

I am doing something very similar to the following:

// Make sure that JPEGs have enough elbow room in memory when creating thumbnails
ini_set("memory_limit","50M");

require_once("supercontainer.php");

$IMAGECACHEDIR = "tempdl";  // This is top level where we will download supercontainer files

$SC_BASE_URL = 'http://myserveraddress.com/SuperContainer/Files';  // Base URL

// Full path to the images folder
$TEMPFILES = "/var/www/books/" . $IMAGECACHEDIR . "/";

$sc = new SuperContainer($SC_BASE_URL);   // Create a new SuperContainer object

$targetfile = "Books" . "/" . $BookRecord['bookID'][0];

// Ask for the file's info.
$targetinfo = $sc->getInfo($targetfile);

// Create an OS friendly file name of of it
$fileName = strtolower(str_replace(" ","",str_replace("r","",$targetinfo['name'])));

// I grab some of the file info which I use for display and such
$fileSize = $targetinfo['size'];
$uploadDate = $targetinfo['date'];

$at_container = $sc->download($targetfile,$TEMPFILES . $fileName);

?>

Create an account or sign in to comment

Important Information

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

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.