Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Multi-Bucket Support allows multiple AWS buckets to be configured in S-Drive. Files will be uploaded to a particular bucket based on criteria determined by a field on the file object created by the System Administrator.

For each file object (AccountFile, ContactFile, etc) including custom file objects, you can create a field to specify which bucket files will be uploaded to. You can use a formula field to create rules to determine what bucket to upload to, or you can use a checkbox, picklist, text field, number field, etc to select the bucket.

Each time a file is uploaded, the bucket field will be read and the file will be uploaded to the specified bucket. The field is read again to retrieve the file for opening or downloading.

The bucket to upload to is determined upon upload AND each time the file is accessed. If the bucket field changes after a file is uploaded (including changes to fields that are used in a bucket field formula) your file will not be found when trying to access it. We recommend setting up validation rules to prevent changes to the bucket field or underlying fields used in a formula for the bucket field.

Setting up Multiple Buckets

Setting up Multiple Buckets has three steps:

  1. Set up your buckets

  2. Create a field on the file object that will determine which bucket is used

  3. Specify that field in S-Drive Configuration

1. Set up your Buckets

You create and manage buckets on S-Drive Configuration “S-Drive Authentication Settings” Tab

Put new screen shot here when encryption column is fixed

Add buckets by choosing Use existing bucket or Create a new bucket

Update screen shot if/when fields are switched

The Bucket Id field is a text field up to 40 characters and must be unique among all your buckets. This Id will be used in the bucket field you set up on the file object. For example, if your bucket field is a picklist, the picklist values need to be the bucket ids. The bucket id can be the same as the bucket name.

2. Create a Bucket Field on the file object

The Bucket field is defined on the file object, such as Account File, Case File, etc. We’ll use Account Files as an example here.

  • Go to Setup->Object Manager->Account Files

  • Go to Fields and Relationships

  • Click New to create a new field

  • Choose what type of field it is, such as Text, Formula, Picklist.

  • Give your field a name (ex: Bucket To Upload To)

  • You can choose a default value if you wish, or you can choose to populate the Bucket To Upload To field on each file you upload

  • Once you’ve finished, click Save

Add examples

Examples of Bucket fields

  • Formula field based on fields on the Parent object: Your bucket field could be a formula field based on a checkbox or other field on the Parent.
    For example, you might have Accounts with government entities whose files will be stored in a government bucket, while other Accounts' files will be stored in a non-government bucket. Create a checkbox on Account called “Is_government_account__c”. Your bucket field on Account File would be a formula like this: IF(cg__account__c.Is_government_account__c, govbucket, nongovbucket).

  • Formula field based on fields on the file object: You may have a formula based on criteria on the file itself.
    For example, create a checkbox on Account Files called Restricted__c. Add that field to the upload page (via S-Drive Configuration Customization Settings) and check it if you are uploading a restricted file. Your bucket field on Account File would be a formula like this: IF(Restricted__c, restrictedt-bucket, non-restricted-bucket)

  • Picklist on file object: Your bucket field could simply be a picklist of buckets.
    Have a picklist field with your bucket ids as values. Add the field to the upload page (via S-Drive Configuration Customization Settings.) When you upload a file, choose the bucket from the picklist.

3. Specify the bucket field in S-Drive Configuration

  • Go to S-Drive Configuration General Settings Tab

  • Scroll down to Upload Settings.

  • Next to Multiple Bucket Setting, click Configure.
    Update screen shot if/when this moves to other tab

  • This will open the following page:

  • The Bucket Name Field is the field you created in step 1 above. Fill in the API field name and click the “Enabled” checkbox.

  • Click Save

Uploading files

Once defined, the bucket name field needs to be populated in order to upload files. This can be done by selecting a bucket for each file when uploading, or by using a formula field. If no bucket is selected, the file will be uploaded to the default bucket, which is chosen during bucket setup.

How Multi-Bucket support work with other features

Upload with duplicates not allowed: Duplicate names are checked on a per-record basis. If you have an Account File called FileA on AccountA in Bucket1, you will get a duplicate warning if you try to upload FileA on AccountA into Bucket2. If you choose to “overwrite”, the old FileA will be deleted from Bucket1 and the new FileA will be uploaded to Bucket2.

Versioning: New versions are uploaded to the same bucket.

File Sync: Files will be synced to the bucket from the bucket field when possible. If the bucket cannot be determined (for example, it is normally selected through the user interface during upload), then files will sync to the default bucket.

Preview and Thumbnail: Previews and Thumbnails are generated for files as expected and reside in the bucket along with the file.

Zip and Download: files from different buckets can be downloaded together into a zip file

Shortcuts: Shortcuts are pointers to files and are not stored in any bucket. A shortcut will point to the underlying file regardless of what bucket it is in. Note; You could have a record with files that are all in Bucket1, but that same record could have a shortcut to a file in Bucket2.

Copy/Paste: The file will be put in the bucket selected according to the bucket field when pasted. Note that if you have implemented a picklist to select the bucket upon uploading the file, you will not be able to select the bucket when copying/pasting. You can only paste into folders on the same record where the copied file resides, so mostly often this will be the same bucket as the copied file.

Cut/Paste: The file will be put in the bucket selected according to the bucket field when pasted. Note that if you have implemented a picklist to select the bucket upon uploading the file, you will not be able to select the bucket when cutting/pasting. You can only paste into folders on the same record where the cut file resides, so mostly often this will be the same bucket as the cut file.

Copy URL: creates a link to the file that points to the correct bucket

Public Share: Gives access to files across multiple buckets

  • No labels