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

Attaching files does not work #5

Closed
christeredvartsen opened this issue Sep 11, 2016 · 0 comments
Closed

Attaching files does not work #5

christeredvartsen opened this issue Sep 11, 2016 · 0 comments
Assignees
Labels

Comments

@christeredvartsen
Copy link
Member

The Given I attach :path to the request as :partName step does not work as expected as it sets the part as a string instead of a file resource:

Instead of:

$part = [
    'name' => $partName,
    'contents' => file_get_contents($path),
];

it should be doing this:

$part = [
    'name' => $partName,
    'contents' => fopen($path, 'r'),
    'filename' => basename($path),
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant