Set Content-Disposition response header on the files(Images, PDFs, csv etc) which are offloaded to Cloudfront using WP Offload S3 Plugin.
These are some basic examples which can be manipulated accroding to the requirements.
Following filter is tested with the WP Offload S3 v1.6.2.
This example sets the Content-Disposition header on all the uploaded files.
This example checking from where the file is uploading. If it is uploading from some specific page then set Content-Disposition header for that file.