Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert HttpOptions files to UploadedFile's #97

Open
kbond opened this issue Jul 15, 2022 · 0 comments
Open

Convert HttpOptions files to UploadedFile's #97

kbond opened this issue Jul 15, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kbond
Copy link
Member

kbond commented Jul 15, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Development

No branches or pull requests

1 participant