Automic Workload Automation

 View Only
  • 1.  Request Management: File upload limitation (SOLUTION)

    Posted Dec 12, 2019 04:31 AM
    Also with version 3.5 of Automic Request Management form component fileupload is hard limited to upload size 10 MB.
    The component does not provide out of the box any check if there is a file selected or if file size is bigger than 10 MB.

    If one of this points is failing the request is afterwards no more usable. Also after reload of request the waiting indicator is shown.

    Ticket to solve this obvious error was rejected with 'works as designed'.

    From my point of view this is an error and should be solved on Automic side.

    Luckily I found solution on my own that solve the issue. It requires to add below snippet to any form in RM.

    MAX_FILE_SIZE =  10000000;
    FILE_SIZE_ERROR_MSG = 'Please provide a file with max. size of ' + (MAX_FILE_SIZE/1000.0) + ' kb in size';
    
    var fileuploadEl = Models.get('fileupload');
    fileuploadEl.uploadBtn.purgeListeners()
    
    fileuploadEl.uploadBtn.on('click',
    	function(){
    		var files = document.getElementsByName('thefile')[0].files;
    		if(files && files[0] && files[0].size > 0 && files[0].size < MAX_FILE_SIZE)
    			this.upload();  
    		else
    			alert(FILE_SIZE_ERROR_MSG); 
    		
    	},fileuploadEl.form
    );




    ------------------------------
    Service Manager JobManagement
    Daimler
    ------------------------------


  • 2.  RE: Request Management: File upload limitation (SOLUTION)
    Best Answer

    Community Manager
    Posted Dec 13, 2019 08:40 AM
    Thank you for sharing Joachim!

    ------------------------------
    Diane Craddock
    Community Manager, Broadcom Enterprise Software Division
    Broadcom Inc.
    ------------------------------