browser icon indicating copy to clipboard operation
browser copied to clipboard

Convert `HttpOptions` files to `UploadedFile`'s

Open kbond opened this issue 3 years ago • 0 comments

Currently, uploading files is a bit verbose:

$browser->post('/endpoint', ['files' => [new UploadedFile($realpath, $name, test: true)]);

It would be better if you could do:

$browser->post('/endpoint', ['files' => [$realpath]);

And HttpOptions auto-converts file paths's to UploadedFile's.

kbond avatar Jul 15 '22 15:07 kbond