how to sedn file with http requse?

Viewed 15

I am writing a test for multi process, I created a file in storage:

File::put($pathMainRNameFile)

now I want to call a spacial route like this:

     $result = $this->post('admin/file/upload', [
        's_file_id' => $sFiles->id,
        'main_file' => File::get($pathMainRNameFile),
        'sign_file' => File::get($pathSignRNameFile),
        'type' => \App\Enums\File\Type::REP,
    ]);

files has JSON extension. but I get bad request error. How can I send file?

0 Answers
Related