AnsweredAssumed Answered

How to pass dynamic config parameter for File Uploader to select SINGLE_MODE or MULTI_MODE

Question asked by pritamthakur on Apr 21, 2017
Latest reply on Apr 24, 2017 by pritamthakur

We are using Aikau framework to integrate to one of our intranet applications, where we have the option to upload files within a directory structure. 
The requirement is we want to switch between MODE_SINGLE_UPLOAD & MODE_MULTI_UPLOAD modes in File Uploader depending on the directory structure level the user is currently present in. File Uploader Dialog is shown on click on Upload button. 

 

On Click of Upload button "ALF_SHOW_UPLOADER" topic is published which is listened by "ContentService.js" in "Slingshot/source/web/js/alfresco/services/" directory. The possible solution I can think here is to pass a flag(for SINGLE & MULTI mode) with publish-payload while publishing to the "ALF_SHOW_UPLOADER" topic, based on which "ContentService.js" will pass the respective config from "showUploader: function" to finally call "show()" method to display File-Uploader with appropriate mode(SINGLE_FILE or MULTIPLE FILE). 

 

I want to know if there is an option to override default "ContentService.js" file so that in "showUploader" function I can change the value for "mode" variable dynamically based on the passed flag while publishing to topic. If possible, I would like to know how I can override this file to make the required changes. 

 

I would also appreciate to have #any alternate approach/suggestion to implement this requirement.

Outcomes