File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed 
components/zoho_workdrive/actions/download-file Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export default {
77  key : "zoho_workdrive-download-file" , 
88  name : "Download File to Tmp Direcory" , 
99  description : "Download a file to the /tmp directory. [See the documentation](https://workdrive.zoho.com/apidocs/v1/filesfolders/downloadserverfile)" , 
10-   version : "0.0.2 " , 
10+   version : "0.0.3 " , 
1111  type : "action" , 
1212  props : { 
1313    app, 
@@ -78,11 +78,12 @@ export default {
7878    } , 
7979  } , 
8080  async  run ( {  $ } )  { 
81-     const  fileName  =  this . fileName  ||  this . fileId . label ; 
81+     const  fileId  =  this . fileId ?. value  ??  this . fileId ; 
82+     const  fileName  =  this . fileName  ??  this . fileId ?. label  ??  "file" ; 
8283    const  filePath  =  getFilePath ( fileName ) ; 
8384
8485    const  fileContent  =  await  this . downloadFile ( { 
85-       fileId :  this . fileId . value , 
86+       fileId, 
8687    } ) ; 
8788
8889    fs . writeFileSync ( filePath ,  fileContent ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments