S3 files header

Hi all,

currently I am using “Amazon S3 Upload Provider Plugin” for uploading files (Media Library) to my S3 bucket. I need to set “Content-Disposition” header, but only for pdf files.
So far I tried to use middlewares on different level (global, api incl. upload etc.), but without any success: ctx.request.files and ctx.request.body are undefined everytime.

Is there another way to achieve it?