ocdladefense/appserver-file-service

A module for uploading and listng files from the Salesforce platform.

v1.2 2022-09-16 19:56 UTC

This package is auto-updated.

Last update: 2024-04-16 23:26:34 UTC


README

Upload a file as an [blank].

Previously referred to as sObject Attachment sObject Documents.

Test routes

Test route URL includes the Salesforce record Id to use when updating a ContentDocument for a given Salesforce record.

Related Salesforce SObjects

ContentDocument

ContentDocumentLink

ContentVersion

Testing Script

  1. While not logged in click on the "Upload Files" and "My Shared Files" and make sure you are getting the access denied message.

  2. After logging in, click on the links again to make sure you have access.

  3. Upload a file using the file upload form with none of the sharing options selected, and make sure that the "ContentDocumentLink" for the file has the current contact's ContactId for the LinkedEntityId field.

  4. Upload another file with the sharing options selected. Make sure that the ContentDocumentLink(s) have the correct LinkedEnityIds.

Testing Script Part 2

  1. The expectation is that if I upload a file while sharing with my contact and a committee I will see two ContentDocumentLinks with the same ContentDocumentId, and the same LinkedEntityId. I expect to see one ContentDocumentLink with matching ContentDocumentId and LinkedEntityId for each entity I shared it with.