Level 1
Pushing that question, because I have the same problem now.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Is there a way to add headers to upload-file request?
Currently I am adding tenant tag to all Livewire requests like so:
import { Livewire } from '../../../vendor/livewire/livewire/dist/livewire.esm';
Livewire.hook('request', ({ uri, options, payload, respond, succeed, fail }) => {
var tenantTag = document.head.querySelector('meta[name="tenant"]');
if(tenantTag) {
options.headers['X-Tenant'] = tenantTag.content;
}
});
But the upload mechanism is different from a "regular" LW request.
Please or to participate in this conversation.