To send custom headers with file upload to pass authorization we have to set xhr2: true in submit options. But in this case file itself is not sent, if not use xhr2, then you can't send authorization headers, so can't upload file with Ext (have to manually use FormData or other ways).
But I want it to work with Ext!
It appeared, that Ext.dataConnsection.setOptions has such line:
data = options.rawData || options.binaryData || options.xmlData || jsonData || null;
but previously options already has "data" set in Ext.form.Panel.beforeAjaxSubmit:
    if (Ext.feature.has.XHR2 && request.xhr2) {        delete request.form;

        formData = = new FormData(form);

        if (request.params) {
            Ext.iterate(request.params, function(name, value) {
                if (Ext.isArray(value)) {
                    Ext.each(value, function(v) {
                        formData.append(name, v);
                else {
                    formData.append(name, value);

            delete request.params;
request object then send as options in setOptions.
The problem is that in the request call is sent result of setOptions, which ignores, so file is not sent.
So should be added here:
data = options.rawData || options.binaryData || options.xmlData || jsonData || || null;
But setOptions is quite complex, so to fix it I've overrided it in such way:
Ext.define('', {
    override: '',

    setOptions: function(options, scope) {
        let params = this.callParent(arguments);

        if (! && options && {

        return params;
It almost solved the issue for me, but in there is check, if data is set, but options.headers has no Content Type set, then content type is set by data, that breaks Content Type for multipart/form...
To avoid this, just set in submit options headers: { 'Content-Type': null }
It could be seen in the fiddle

Hope this will help someone, as the ability to upload files with needed headers by standard Ext calls should work out of the box.
And maybe someone will fix this in next releases