Handle special characters

hello i am trying to handle special characters in url when uploading using tus plugin. uppy handle that but my server cant accept string sequence “%C3%8C%C2%81” as part of request which represents ‘í’ which is czech language character and is quite common.

so i tried to change filename to base64 an store it but it changed name also in UI which i dont wanted

                onBeforeFileAdded: (file, files) => {
                    const modifiedName = generateGUID() + '_' + file.name;
                    const base64Name = btoa(modifiedName);
                    uppy.setMeta(file.id, { base64filename: base64Name });
                    console.log(base64Name);
                    return file;
                }
            })

so i changed name to original name and then before upload i changed name in endpoint but this does not work it still sends original name in url…

 .on('file-added', (file) => {
     const originalName = filenameMap.get(file.meta.name);
     if (originalName) {
         uppy.setFileMeta(file.id, {
             name: originalName
         });
     }
 })

 .on('before-upload', (files) => {
     const updatedFiles = { ...files };
     console.log('Files before upload: ', files);
     Object.keys(updatedFiles).forEach((fileId) => {
         const file = updatedFiles[fileId];
         const base64Name = file.meta.base64filename;  // Use the metadata
         const endpoint = `${QIPortalAPI.appPath}/FileUpload/${base64Name}`;

         const uploadInfo = {
             endpoint: encodeURI(endpoint),
             headers: {},
             chunkSize: 5 * 1024 * 1024,
         };

         if (uppy.getPlugins().some(plugin => plugin.id === 'Tus')) {
             file.tus = uploadInfo;
         }
     });

     return updatedFiles;
 })

when sending post request there is filename in metadata encoded as base64 is there a way how to add this metadata to patch and head request? or is there a way how to change upload url to base64?

Hi this is not configurable. I think it’s probably best to handle this properly server-side.