armomkrtchyan's avatar

Test file store method

$response = $this->call($method, $uri, $parameters, $cookies, $files, $server, $content);

someone could bring example with uploading $files ?

0 likes
3 replies
armomkrtchyan's avatar
$file = new UploadedFile(base_path('/tests/Resources/test.jpg'), 'test.jpg') ;
        $res = $this->call('POST', '/api/some/upload/uri', [
            '_token' => $this->token(),
            'file' => $file,
        ]);

my uri have 2 params, token and file and it should returns new uploaded file id!

but I receive FileNotFound Exception

bobbybouwmann's avatar

Show the code in the controller? How do you handle the upload stuff, we need the whole code to help you out

Please or to participate in this conversation.