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

cancel
Showing results for 
Search instead for 
Did you mean: 
pritamthakur
Member II

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

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.

1 Reply
pritamthakur
Member II

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

Just to add that we are currently using Enterprise Alfresco v5.0.2 with Aikau 1.0.82, in case this information is helpful in suggesting the best way to override the JS file.