You can create a dynamic upload button URL by simply passing relevant URL parameters with values in it.


The following example shows the dynamic URL for an account object: 

  • Go to setup and choose your object. Setup > Object > Account
  • Select buttons, links, and actions and click on the "New button or link" option.
  • Give the newly created button a label, display type: Detail page button, and behavior with the option to display in an existing window with the sidebar.
  • Add the formula to the section:
    • /apex/DragDropToCloud__DragDropUploader?parent_id={!Account.Id}&newBucket={!bucket_name}&newFolder=001-account/{!SUBSTITUTE(Account.Name," ", "")}/:Name
  • Generic button URL Formula:  
    • /apex/DragDropToCloud__DragDropUploader?parent_id={!Object.Id}&accesslevel=private&newBucket={!bucket_name}&newFolder=001-object/{!SUBSTITUTE(Object.Name," ", "")}/:Name
  • Click on save. (Note: Need to add the button on page layout )
  • newBucket - use this URL parameter to set the default bucket
  • newFolder - use this URL parameter to set the default folder name
  • accesslevel - use this URL parameter to set the default access level


Note: 

  1. Bucket, folder & access level selection settings must be enabled on the settings page in order to use these parameters.
  2. Bucket selection will be available from version 2.7