Modifications pour le document FileUploader
Modifié par Admin le 11/07/2023 - 11:56
Résumé
-
Propriétés de la Page (1 modifications, 0 ajouts, 0 suppressions)
Détails
- Propriétés de la Page
-
- Contenu
-
... ... @@ -42,6 +42,8 @@ 42 42 #set ($fileName = $xwiki.fileupload.getFileName('upload')) 43 43 #if ("$!fileName" != '') 44 44 #if ($services.csrf.isTokenValid($request.form_token)) 45 + ## Note: This is not useful anymore and files are expected to have their definitive name on upload. 46 + ## Kept for legacy. 45 45 #if ($fileName.startsWith('__fileCreatedFromDataURI__.')) 46 46 ## We need to generate a new name so that we don't overwrite existing attachments. 47 47 #set ($extension = $stringtool.substringAfter($fileName, '.')) ... ... @@ -71,6 +71,8 @@ 71 71 #set ($fileName = $request.filename) 72 72 #else 73 73 #set ($fileName = $request.getPart('upload').getSubmittedFileName()) 76 + ## Note: this is not useful anymore and files are expected to have their definitive name on upload. 77 + ## Kept for legacy. 74 74 #if ($fileName.startsWith('__fileCreatedFromDataURI__.')) 75 75 ## We need to generate a new name so that we don't overwrite existing attachments. 76 76 #set ($extension = $stringtool.substringAfter($fileName, '.'))