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.

Two SC servers, one database

Featured Replies

I've got a couple SC licenses running on different servers. I've got one database and I want to store files on both servers. (why? well, I'm migrating from one server to another, but it's go to be done over a couple months due to bandwidth limitations).

I'm storing each image's filepath as a record in a standalone table. That full filepath will be different depending on the host for that file. When calling any of the plugin functions by script, I believe got to also call SCSetBaseURL, right? That base host is either taken from the record (if downloading) or given based on business logic (if uploading).
I want a calculated FM Container field using SCGetContainer(). I think I have to call SCSetBaseURL() in the calculation field as well. I've never used SCSetBaseURL() in a field definition, so I'm a little wary. I've tested it and it works. There's a slight performance hit.

Is calling SCSetBaseURL() every time I call a SC plugin the best way to do what I'm trying to do? Is there a way to use a full filepath to SC rather than a local filepath for these plugin functions?

Thanks and I love the product!

David,

You only need to call SCSetBaseURL when you want to change which SuperContainer you want to download/upload to. So if you call SCSetBaseURL("http://MySCServer.com/SuperContainer/Files") all subsequent calls to the companion plugin will be in reference to that base URL. You will not need to call SCSetBaseURL again unless you want to upload/download to a different instance of SuperContainer.

Hope that helps!

 

  • Author

Thanks for the reply.

What is the downside to calling SCSetBaseURL()? Is there any way to determine what the current base URL is? (I'm aware I could capture it in a $$var, sure.) And would that method have fewer downsides that just calling SCSet?

Is there a way to use a fully path, rather than calling SCSet?

I am referencing files using as records in a table. Each record may have a different host. Therefore, when I want to reference a file, I have to know the existing base path to compare. Or just change it on the fly.

 

 

 

 

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.