Gnurps Posted July 7, 2009 Posted July 7, 2009 Hi. I am trying to get SuperContainer to download a file to my desktop using the SCDownload function of the plugin. The prototype calls for a folderPath parameter. I cannot understand what that value is. In your documentation for SC, and example is: Set Variable[$folderPath; Value: Get ( LayoutTableName ) & "/" & ID] That just puts the Filemaker table name into the variable. It's not a path to an SC file. In the demo FM file, "SuperContainer Example.fp7," the folderPath gets a field cResourceIdentifier, which has the calc ""360Demo/" & id". Is that 360Demo folder supposed to be inside the Files folder of SC (/Users/Shared/SuperContainer/FIles)? I tried this with my own solution and only get an error. My objective is to have SuperContainer deliver a file to a user's desktop without having to mount the drive that has the SC files. Thanks, Gary S
shmert Posted July 8, 2009 Posted July 8, 2009 Hi Gary, The Get(LayoutTableName) is just a convenient way to say "use the table name as the first part of the path identifier". It's probably better to hard-code your table name, so you can use it from other layouts. Whenever you call a plugin function, you typically only pass in the path component, not the full URL or full path to the file on the server. A good approach for resource identifiers is to include the type of object being stored (e.g. the table name, or 360Demo) followed by a slash followed by some identifier for a specific object, such as a primary key or unique UUID. If you have a Web Viewer pointing to the SuperContainer url http://myserver:8020/SuperContainer/Files/Documents/12345 the resource identifier is Documents/12345. This is what you'd pass to the plugin to download the file, after first calling SCSetBaseURL to tell the plugin where your SuperContainer server is running.
Gnurps Posted July 8, 2009 Author Posted July 8, 2009 That folder_name/image_id process worked for me. I still don't get the abstract name "resource identifier," and the why one would use Get(LayoutTableName) since a database table has little to do with file folder structure on the hosting computer. But hey, it's working. Here's my second related question: How about getting at the thumbnails? Can SuperContainer cause a download of the thumbnails that are generated by webviewers? The SCDownload() function example downloads the original file, the one in the SuperContainer/Files/... folders. I want to get at the files in SuperContainer/thumbnails/.... Thanks, Gary
shmert Posted July 8, 2009 Posted July 8, 2009 Yes, just specify a width/height in the plugin function http://www.360works.com/plugins/SuperContainer/plugin-documentation.html#SCDownload This will return a thumbnail version of the image
Gnurps Posted July 9, 2009 Author Posted July 9, 2009 Thanks. Is that a version 2 feature? I did not see the extra parameters because I was reading a version 1.8 documentation on my hard drive. We don't own v2 yet. Is there an upgrade price? We have a workgroup license. Thanks much, Gary
Recommended Posts
This topic is 5614 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 accountSign in
Already have an account? Sign in here.
Sign In Now