There’s a similar thread to your question How do i replicate chatgpt file upload option UI
To achieve this, I think you may have to write an entirely new bidirectional component that accepts both chat input and file uploads. This is also mentioned in the thread above.