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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Jun 30, 2016

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Jun 30, 2016

Member

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

Member

Naktibalda commented Jun 30, 2016

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

Naktibalda added a commit to Naktibalda/Codeception that referenced this issue Jun 30, 2016

@Naktibalda Naktibalda closed this in #3299 Jul 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment