Uploading image or pdf with a pre-request script PUT method

I am trying to automate uploading over 100 files using a PUT method. However I’ve been unsuccessful after many attempts. I keep getting the following error: ‘uploading files from scripts is not allowed’. I know that I can upload a file manually then choosing form-data, binary etc but that is NOT what I want to do. I want to upload the files by just clicking the Send button (no additional steps)

My workflow:

  1. /POST method to create a thing
  2. /PUT method to add a file to that thing*:


I’ve already tried:

let test = JSON.parse(pm.environment.get('test'));

    url: test.url,
    method: 'PUT',
    headers: {
        'Content-Type': 'application/pdf'
    body: {
       mode: 'file',
       file: JSON.stringify({
           src: '/path/to/my/file'
}, function(err, res) {