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

[REST] Break on file upload #3298

Closed
VincentClair opened this issue Jun 30, 2016 · 2 comments
Closed

[REST] Break on file upload #3298

VincentClair opened this issue Jun 30, 2016 · 2 comments

Comments

@VincentClair
Copy link

@VincentClair VincentClair commented Jun 30, 2016

Hello,

Before, with version 2.1.8, we could pass a Symfony\Component\HttpFoundation\File\UploadedFile as value . Something like:

$I->sendPOST('/ui/options/images',
    ['name'  => 'logo'],
    ['image' => new UploadedFile($filePath, $filename, $mimeType, filesize($filePath))]
);

Since version 2.2.2, it seems to be broken. I get an error that the value of key image is invalid.
I changed the UploadedFile to the indexed array version and it works.
Is it normal ?

@DavertMik
Copy link
Member

@DavertMik DavertMik commented Jun 30, 2016

I never knew Symfony\Component\HttpFoundation\File\UploadedFile can be passed, he-he )
It class is not even part of Codeception package so this behavior was not expected.
But if @Naktibalda will provide a way to do this that would be useful too. Probably we will need to update docs to specify such behavior

@Naktibalda
Copy link
Member

@Naktibalda Naktibalda commented Jun 30, 2016

Anything that's expected by a framework could be passed.
We really need to document file uploads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.