Api option 'fieldName' in xhr upload doesnt work [Symfony 5]

Hi im using uppy in symfony 5 project.

const $dashboard = $('#uppy-dashboard');

    new Uppy()
        .use(Dashboard, {inline: true, target: '#uppy-dashboard'})
        .use(XHR, {
            fieldName: 'temporary_file[file]',
            endpoint: $dashboard.data('url'),
                headers: {
                    Authorization: `Bearer ${$dashboard.data('jwt-token')}`,

I have above configuration of uppy and in my request file key is still ‘file’ instead of ‘temporary_file[file]’.
File inside UplodedFile is correct.

Zrzut ekranu Deepin_wybierz-obszar_20230402184304

What im doing wrong?

I was using docs XHR | Uppy and in my case the $_FILES has only key ‘file’.

Hi, could you please try adding formdata: true? It mentions on the docs that it’s needed for the fieldName to work: XHR | Uppy.