Jump to content
David Jondreau

Two SC servers, one database

Recommended Posts

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!

Share this post

Link to post
Share on other sites


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!


Share this post

Link to post
Share on other sites

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.





Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Who Viewed the Topic

    1 member has viewed this topic:
    Nico Kobes 
  • Create New...

Important Information

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