Repository navigation
[REST] Support simple key-value format for file uploads - #3244
Merged
DavertMik merged 1 commit intoJun 21, 2016
Merged
Conversation
|
|
||
| private function getFileType($file) | ||
| { | ||
| if (function_exists('mime_content_type') && mime_content_type($file) ) { |
There was a problem hiding this comment.
Expected 0 spaces before closing bracket; 1 found
Naktibalda
force-pushed
the
2.2-rest-simple-file-upload
branch
from
June 20, 2016 20:34
56215b0 to
f1e494b
Compare
Member
|
Thank you! |
|
Before, with version 2.1.8, we could pass a Since version 2.2.2, it seems to be broken. I get an error that the value of key image is invalid. |
Member
Author
|
@VincentClair Thanks for report, I will change the code to allow objects. Could you raise it as an issue? |
|
Here it is #3298 :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When REST module was used with PhpBrowser(or more specifically with Guzzle), file upload could be done in 2 formats: https://github.com/Codeception/Codeception/blob/2.2.1/tests/unit/Codeception/Module/PhpBrowserRestTest.php#L205
and
The magic happened in in the Guzzle (if I remember correctly).
When REST module was used with framework modules, the user had to provide a complete $_FILES array (the first type).
I added support for the second type of file upload for all frameworks, but I only tested it with ZF2,
I will test it with ZF1 and Zend-Expressive tomorrow.
Naktibalda/codeception-rest-testcase@024d387