Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By justinopsky
#824014
I need to find the url with the extension of the in a multiple file upload

For exemple, i need that url
/opt/processmaker/shared/sites/workflow/files/953/410/836/56f478db365c17079559272/70178872256ec84a7a2eb59060003782_1.pdf

I can get the url but not the extension (.pdf)

thanks
User avatar
By amosbatto
#824024
justinopsky wrote:I need to find the url with the extension of the in a multiple file upload

For exemple, i need that url
/opt/processmaker/shared/sites/workflow/files/953/410/836/56f478db365c17079559272/70178872256ec84a7a2eb59060003782_1.pdf

I can get the url but not the extension (.pdf)
That is not a URL. It is the path to the uploaded file on the server's file system.

You can use the following trigger to obtain the path:
Code: Select all
if (!empty(@=myMultiFile)) {
   foreach (@=myMultiFile as $aFile) {
      //construct path to the stored file in the server's file system:
      $ext = pathinfo($aFile['name'], PATHINFO_EXTENSION);
      $g = new G();
      $path = PATH_DOCUMENT . $g->getPathFromUID(@@APPLICATION) . PATH_SEP .
         $aFile['appDocUid'] . '_' . $aFile['version'] . '.' . $ext;
   }  
}
If you are using JavaScript, then see:
https://www.pmusers.com/index.php/Manip ... JavaScript

To switch from PST to MBOX quickly and effectively[…]

NFT (Non-Fungible Token) marketplaces have witness[…]

AMP Review South Jersey - OkThumb

AMP Review South Jersey functions as the forum s[…]

An NFT marketplace development company specializes[…]