Support the ongoing development of →
Input Testing Configuration
Last updated 1 year ago.

I happen to have solved the problem.. issue was with how you make a call when one key can have more than one item.

I though that you would define the name i.e. file[] and than you attach files to it, which was wrong.

Correct way of make such calls is : file => [$file1, $file2]

Below is updated method

$datafile = new \Symfony\Component\HttpFoundation\File\UploadedFile(
            base_path('tests/files/File1.csv'), 'File1.csv', 'text/csv', 13071, null, false

    $files = ['file' => [$datafile]];

    $response = $this>call(
            'POST', # $method
            '/user/files/uploadFiles', # $action 
            $values, # $parameters 

Sign in to participate in this thread!


Your banner here too?

spikerok spikerok Joined 23 Sep 2015


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.